- Create the project from the following template:
$ sls create --template-url https://github.com/danteinc/js-cloud-native-cookbook/tree/master/ch2/replaying-events --path cncb-replaying-events
- Navigate to the cncb-replaying-events directory with cd cncb-replaying-events.
- 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' ...