- Create the project from the following template:
$ sls create --template-url https://github.com/danteinc/js-cloud-native-cookbook/tree/master/ch2/materialized-view-dynamodb --path cncb-materialized-view-dynamodb
- Navigate to the cncb-materialized-view-dynamodb directory with cd cncb-materialized-view-dynamodb.
- Review the file named serverless.yml with the following content:
service: cncb-materialized-view-dynamodbprovider: name: aws runtime: nodejs8.10 iamRoleStatements: ... environment: TABLE_NAME: Ref: Tablefunctions: listener: handler: handler.listener events: - stream: type: kinesis arn: ${cf:cncb-event-stream-${opt:stage}.streamArn} ... query: handler: handler.queryresources: Resources: Table: Type: AWS::DynamoDB::Table ...