O'Reilly logo

JavaScript Cloud Native Development Cookbook by John Gilbert

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

  1. Create the project from the following template:
$ sls create --template-url https://github.com/danteinc/js-cloud-native-cookbook/tree/master/ch2/micro-event-store --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: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required