Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rpgreen/cfn

Friendly command-line tools for AWS CloudFormation
https://github.com/rpgreen/cfn

aws cloudformation golang

Last synced: 3 days ago
JSON representation

Friendly command-line tools for AWS CloudFormation

Awesome Lists containing this project

README

        

# cfn
A simple command-line tool to tail human-readable [AWS CloudFormation](https://aws.amazon.com/cloudformation/) events suitable for observing stack creation and updates in real-time. This may be useful when developing and testing CloudFormation templates, or when monitoring infrastructure deployments.
## Install
```
go get github.com/rpgreen/cfn
```
(Optional) Configure aws cli
```
aws configure
```
## Use
```
Usage: cfn [-c command] [-s stackname] [-r region] [-p profile]
-c string
Command to use (i.e. 'tail') (default "tail")
-p string
AWS SDK profile name to use (optional)
-r string
AWS region to use (optional)
-s string
Stack to use (optional)
-o string
Output format to use (text or table) (default "text")
```
## Examples
### Tail events from the most recently updated stack using default AWS credentials and region
```
$ ./cfn
```
### Tail events using specified stack and region, and using specified AWS credentials profile
```
$ ./cfn -s mystack -p myprofile -r us-east-1
```
### Tail events after creating/updating a stack
```
$ aws cloudformation create-stack --stack-name mystack --template-body file://mytemplate.yml && cfn -s mystack
```

By default, cfn will look for credentials using the default credential provider chain used by the [AWS CLI](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#config-settings-and-precedence). Similarly, the default region is based on the AWS CLI configuration.

To provide a custom credential profile, use the -p option. To override the default region, use the -r option.

If no stack is specified with -s option, cfn will attempt to find the most recently updated stack.