- Create the project from the following template:
$ sls create --template-url https://github.com/danteinc/js-cloud-native-cookbook/tree/master/ch2/db-first-dynamodb --path cncb-db-first-dynamodb
- Navigate to the cncb-db-first-dynamodb directory with cd cncb-db-first-dynamodb.
- Review the file named serverless.yml with the following content:
service: cncb-db-first-dynamodbprovider: name: aws runtime: nodejs8.10 iamRoleStatements: - Effect: Allow Action: - dynamodb:PutItem Resource: Fn::GetAtt: [ Table, Arn ] - Effect: Allow Action: - kinesis:PutRecord Resource: ${cf:cncb-event-stream-${opt:stage}.streamArn}functions: command: handler: handler.command environment: TABLE_NAME: Ref: Table trigger: handler: handler.trigger events: ...