A simple CLI tool that will take an AWS profile, and an output directory, and dump all of the CloudFormation templates in every region into files on the local disk.
How is this helpful? I don't know about any general case, but I needed it to solve a specific problem around code archaeology.
Dump templates from all regions into a pre-existing directory called templates
.
mkdir templates
dumpcft --profile PROFILE templates
Writing CloudFormation templates to directory: templates.
Specify a set of regions in a comma-delimited list.
mkdir templates
dumpcft --profile PROFILE --regions us-east-1,us-west-1 templates
Writing CloudFormation templates to directory: templates.
Write the templates to a directory of your choice.
dumpcft --profile PROFILE -o /tmp/templates
Writing CloudFormation templates to directory: /tmp/templates
All CloudFormation templates dumped by this tool will have the filename format:
AWS_ACCOUNT_ID.REGION.STACK_NAME.[yaml|json]
An example of which would be 01234567890.ca-central-1.example-app.yaml
for a CloudFormation stack named example-app
residing in ca-central-1
within the AWS account with ID 01234567890
.
- Fork the repository.
- Make your change.
- Ensure
make fmt
is run. - Ensure
make test
completes successfully. - Make a Pull Request.
- Add a clear, concise summary in the Pull Request.