Last active
June 11, 2020 18:17
-
-
Save PaulDuvall/18775025c0fea024ce39a55eca8e34cb to your computer and use it in GitHub Desktop.
Use the AWS SAM to define a Serverless Function
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
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