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/replaying-events --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' ...

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