How to do it...

  1. Create the project from the following template:
$ sls create --template-url --path cncb-micro-event-store
  1. Navigate to the cncb-micro-event-store directory with cd cncb-micro-event-store.
  2. Review the file named serverless.yml with the following content:
service: cncb-micro-event-storeprovider:  name: aws  runtime: nodejs8.10  iamRoleStatements:    - Effect: Allow      Action:        - dynamodb:PutItem        - dynamodb:Query      Resource:        Fn::GetAtt: [ Table, Arn ]  environment:    TABLE_NAME:      Ref: Tablefunctions:  listener:    handler: handler.listener    events:      - stream:          type: kinesis          ...  trigger:    handler: handler.trigger    events:      - stream:          type: dynamodb          arn: Fn::GetAtt: ...

Get JavaScript Cloud Native Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.