Created
June 23, 2020 05:27
-
-
Save jsonw23/474edc2da55fdf138fc6957170c3d221 to your computer and use it in GitHub Desktop.
Adding a resource to the template in the SAM sample hello-world project
This file contains hidden or 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
Resources: | |
# the hello-world function from the sample project | |
HelloWorldFunction: | |
Type: AWS::Serverless::Function | |
Properties: | |
CodeUri: hello_world/ | |
Handler: app.lambda_handler | |
Runtime: python3.8 | |
Events: | |
HelloWorld: | |
Type: Api | |
Properties: | |
Path: /hello | |
Method: get | |
# a DynamoDB table that we're going to connect to in our function | |
MyTable: | |
Type: AWS::DynamoDB::Table | |
Properties: | |
AttributeDefinitions: | |
- AttributeName: id | |
AttributeType: S | |
KeySchema: | |
- AttributeName: id | |
KeyType: HASH | |
ProvisionedThroughput: | |
ReadCapacityUnits: 5 | |
WriteCapacityUnits: 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment