1.0.1 • Published 7 years ago
cfn-events-stream v1.0.1
cfn-events-stream
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