What is Rain?
Rain is a command-line tool that streamlines CloudFormation workflows. It can deploy, diff, and remove stacks while handling change sets and parameter files for you. The starter kit wraps Rain so every environment follows the same deployment path locally and in CI/CD.
How the Starter Kit Uses Rain
| Integration Point | Description |
|---|---|
| Provisioning scripts | Calls rain deploy for each template under templates/, pairing it with the matching parameter file |
| CI/CD workflows | Installs latest Rain release and runs deploy script on every push to main |
| Local development | Encourages running Rain directly for previews or change sets before pushing |
The default command executed by the deploy script looks like this:
rain deploy "templates/<name>.yml" --yes --config "parameters/<environment>/<name>.yml"
--yessuppresses interactive prompts so automated runs stay non-blocking.--configloads environment-specific parameters, tags, and stack options.
Useful commands
Run these from the repository root after installing Rain:
# Preview a stack without applying it
rain deploy templates/oidc-provider.yml --config parameters/test/oidc-provider.yml --changeset
# Deploy all templates for the test environment via the helper script
./scripts/deploy-templates.sh -e test
# Remove a stack that Rain previously deployed
rain rm github-oidc-provider --yes
See the full command reference in the Rain documentation.
Customizing Rain Usage
| Customization | Method |
|---|---|
| Pin a version | Set RAIN_VERSION environment variable in workflow before install step to ensure consistency |
| Enable additional flags | Export RAIN_FLAGS="--changeset" and update deploy script to append to every Rain invocation |
| Use profiles | Rain relies on AWS CLI configuration; set AWS_PROFILE or AWS_DEFAULT_REGION before running locally |
Need to understand how parameters feed into Rain? Review the Parameters reference.