A wrapper around the AWS CloudFormation Node API that monitors the progress of CF commands while providing smart logging.
The AWS API handles CloudFormation commands asynchronously, meaning you make a request to create a stack and you then write a bunch of boilerplate code to poll and wait for the creation to finish.
This aims to replace that boilerplate code with some pretty
winston logging so you can watch the events as they come.
;;;const input = StackName: 'blah' TemplateBody: 'template goes here';const cf = ;// simplest log configurationwinstonloggers;cf;
CFMonitor waits for your stack to complete, it will poll for the status.
The interval in between polls can be controlled via the
AWS_CF_MONITOR_DELAY environment variable.
The default is 5000 milliseconds.
You can configure the logger by whichever means you prefer to configure a
The name of the logger is
aws-cf-monitor, which is a constant saved in
See the winston project for more information.
The way the
[serverless framework](https://github.com/serverless/serverless) handles these CloudFormation requests is the inspiration.
The framework handles polling well and prints some pretty color-coded logging as well, making it easy to follow the progress of the stack.
The bulk of that original logic is in the monitorStack.js.