How to do it...

  1. Create the project from the following template:
$ sls create --template-url --path cncb-replaying-events
  1. Navigate to the cncb-replaying-events directory with cd cncb-replaying-events.
  2. Review the file named ./lib/replay.js with the following content:
exports.command = 'replay [bucket] [prefix]'exports.desc = 'Replay the events in [bucket] for [prefix]'const _ = require('highland');const lodash = require('lodash');const aws = require('aws-sdk');aws.config.setPromisesDependency(require('bluebird'));exports.builder = {    bucket: {        alias: 'b',    },    prefix: {        alias: 'p',    },    function: {        alias: 'f',    },    dry: {        alias: 'd',        default: true, type: 'boolean' ...

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

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