Last active
January 20, 2020 10:03
-
-
Save AndrewBestbier/7b903e840c225dbc0be22567f3a53503 to your computer and use it in GitHub Desktop.
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
AWSTemplateFormatVersion: "2010-09-09" | |
Transform: AWS::Serverless-2016-10-31 | |
Resources: | |
DynamoBooksTable: | |
Type: AWS::Serverless::SimpleTable | |
Properties: | |
TableName: books | |
PrimaryKey: | |
Name: id | |
Type: String | |
CreateBookFunction: | |
Type: AWS::Serverless::Function | |
Properties: | |
CodeUri: src/ | |
Handler: create-book.handler | |
Policies: AmazonDynamoDBFullAccess | |
Runtime: nodejs12.x | |
Events: | |
CreateBook: | |
Type: Api | |
Properties: | |
Path: /books | |
Method: post | |
GetBooksFunction: | |
Type: AWS::Serverless::Function | |
Properties: | |
CodeUri: src/ | |
Handler: get-books.handler | |
Policies: AmazonDynamoDBFullAccess | |
Runtime: nodejs8.10 | |
Events: | |
GetBooks: | |
Type: Api | |
Properties: | |
Path: /books | |
Method: get |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment