cfn-events-stream

1.0.1 • Public • Published

cfn-events-stream Build Status

Readable stream of CloudFormation stack events

Install

$ npm install --save cfn-events-stream

Usage

API

var CfnEventsStream = require('cfn-events-stream')
 
CfnEventsStream({
  stackName: 'my-stack',
  region: 'us-east-1'
})
.pipe(ndjson.serialize())
.pipe(process.stdout)
 
#=> {"EventId": "abc"...}

The API returns a Readable stream in object mode that emits each new event received after the initial check. The JSON ResourceProperties field will be parsed into a proper object. When the stack enters a *_COMPLETE state the stream will end.

CLI

cfn-stack-events \
  --stack-name my-stack \
  --region us-east-1

The CLI emits ndjson where each line is a new stack event until stack enters a complete state.

License

MIT © Ben Drucker

Package Sidebar

Install

npm i cfn-events-stream

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • bendrucker