Last active
December 1, 2022 10:36
-
-
Save RabinMallick/94f6472c86ed588ed7bdbab203646f61 to your computer and use it in GitHub Desktop.
A sam template with a lambda function and a dynamoDB table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Resources: | |
AppFunction: | |
Type: AWS::Serverless::Function | |
Properties: | |
Handler: app/index.handler | |
Runtime: nodejs6.10 | |
Timeout: 60 | |
Events: | |
ApiEventSource: | |
Type: Api | |
Properties: | |
Path: /{proxy+} | |
Method: ANY | |
DependsOn: AppTable | |
AppTable: | |
Type: "AWS::DynamoDB::Table" | |
Properties: | |
AttributeDefinitions: | |
- | |
AttributeName: "timestamp" | |
AttributeType: "N" | |
KeySchema: | |
- | |
AttributeName: "timestamp" | |
KeyType: "RANGE" | |
ProvisionedThroughput: | |
ReadCapacityUnits: 5 | |
WriteCapacityUnits: 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment