- Create the project from the following template:
$ sls create --template-url https://github.com/danteinc/js-cloud-native-cookbook/tree/master/ch2/db-first-cognito --path cncb-db-first-cognito
- Navigate to the cncb-db-first-cognito directory with cd cncb-db-first-cognito.
- Review the file named serverless.yml with the following content:
service: cncb-db-first-cognitoprovider: name: aws runtime: nodejs8.10 ...functions: trigger: handler: handler.trigger events: - stream: type: kinesis arn: Fn::GetAtt: [ CognitoStream, Arn ] ... environment: STREAM_NAME: ${cf:cncb-event-stream-${opt:stage}.streamName}resources: Resources: CognitoStream: Type: AWS::Kinesis::Stream Properties: ShardCount: 1 IdentityPool: Type: AWS::Cognito::IdentityPool ...