Created
September 11, 2017 12:38
-
-
Save rts-rob/7adb1102d1c1d1bd619ed5329071276e to your computer and use it in GitHub Desktop.
Simple Serverless Framework example with one DynamoDB table and one Lambda 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
service: serverless | |
provider: | |
name: aws | |
runtime: nodejs6.10 | |
functions: | |
someFunction: | |
handler: someFunction.handler | |
description: Lambda Function | |
events: | |
- stream: | |
type: dynamodb | |
arn: | |
'Fn::GetAtt': | |
- someTable | |
- StreamArn | |
resources: | |
Resources: | |
someTable: | |
Type: 'AWS::DynamoDB::Table' | |
Properties: | |
AttributeDefinitions: | |
- AttributeName: id | |
AttributeType: S | |
- AttributeName: version | |
AttributeType: 'N' | |
KeySchema: | |
- AttributeName: id | |
KeyType: HASH | |
- AttributeName: version | |
KeyType: RANGE | |
ProvisionedThroughput: | |
ReadCapacityUnits: 5 | |
WriteCapacityUnits: 5 | |
StreamSpecification: | |
StreamViewType: NEW_AND_OLD_IMAGES | |
Outputs: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment