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