Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Use the AWS SAM to define a Serverless Function
Type: 'AWS::Serverless::Function'
Properties:
Handler: index-get.handler
CodeUri: src/
Runtime: nodejs12.x
AutoPublishAlias: live
DeploymentPreference: ...
MemorySize: 128
Policies:
- DynamoDBReadPolicy:
TableName:
Ref: MyDynamoDBTable
Environment:
Variables:
TABLE_NAME:
Ref: MyDynamoDBTable
Events:
GetDataApi:
Type: HttpApi
Properties:
ApiId:
Ref: MyApi
Method: GET
Path: /clouds
TimeoutInMillis: 15000
Description: 'Get data from DynamoDB table'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.