https://github.com/stuartellis/button
Light-touch AWS CloudFormation for any project
https://github.com/stuartellis/button
aws cloudformation python
Last synced: about 2 months ago
JSON representation
Light-touch AWS CloudFormation for any project
- Host: GitHub
- URL: https://github.com/stuartellis/button
- Owner: stuartellis
- License: mit
- Created: 2019-09-14T08:57:57.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-14T09:02:17.000Z (almost 7 years ago)
- Last Synced: 2025-10-19T07:54:51.900Z (8 months ago)
- Topics: aws, cloudformation, python
- Language: Python
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Button
[](https://masterminds.github.io/stability/active.html)
Just drop _button.py_ into any project that has CloudFormation templates. You can then manage your application environments without either a stand-alone DevOps tool, or the awkwardness of interacting with the AWS command-line utility.
## Usage
1. Copy the file _button.py_ into your project
2. Put the AWS CloudFormation files in a directory with a sensible name, such as _./aws/staging_
3. Run _button.py_
For example, to create the CloudFormation stack from the files in the directory _aws/staging_, run this command:
./button.py create aws/staging
Button can also _update_ and _delete_ CloudFormation stacks:
./button.py update aws/staging
./button.py delete aws/staging
Button always validates the CloudFormation template before it runs any other command. It uses the online validation service that is provided by AWS. Use the _validate_ command to check a template without actually running it:
./button.py validate aws/staging
For more details, use the _--help_ option:
./button.py --help
Button requires your computer to have Python 2 or above, and [the official AWS command-line utility](https://aws.amazon.com/cli/).
## Expectations
This tool is deliberately very simple and very opinionated. It assumes that:
- You have a CloudFormation template file in YAML format. By default, it looks for a file called _template.yaml_.
- The tags for the template are in a separate JSON file, called _tags.json_
- If your template uses parameters, these are in a JSON file. By default this file will be called _parameters.json_.
- All of these files are in the same directory
You can specify different names for these files as options if you need to.
To automatically decide the name of the CloudFormation stack, Button looks for tags called _Project_, _Environment_ and _Tier_. The AWS CloudFormation stack is assumed to have the name _project-environment-tier_, which match these tags. If this is not what you want, use the _-s_ option to specify the name of the stack.
The _examples_ directory contains a working set of files to show how this works.