- Create the project from the following template:
$ sls create --template-url https://github.com/danteinc/js-cloud-native-cookbook/tree/master/ch3/event-orchestration --path cncb-event-orchestration
- Navigate to the cncb-event-orchestration directory with cd cncb-event-orchestration.
- Review the file named serverless.yml with the following content:
service: cncb-event-orchestrationprovider: name: aws runtime: nodejs8.10 iamRoleStatements: ...functions: listener: handler: handler.listener events: - stream: type: kinesis arn: ${cf:cncb-event-stream-${opt:stage}.streamArn} ... environment: STREAM_NAME: ${cf:cncb-event-stream-${opt:stage}.streamName}
- Review the file named handler.js with the following content:
const transitions ...