LinuxCommandLibrary

rain

Interactive AWS CloudFormation deployment tool

TLDR

List all CloudFormation stacks in the current region

$ rain ls
copy
Deploy a CloudFormation template
$ rain deploy [template.yaml] [stack-name]
copy
Get the template from a running stack
$ rain cat [stack-name]
copy
Show event logs for a stack
$ rain logs [stack-name]
copy
Format a CloudFormation template
$ rain fmt [template.yaml]
copy
Compare two templates
$ rain diff [template1.yaml] [template2.yaml]
copy
Delete a CloudFormation stack
$ rain rm [stack-name]
copy
Predict deployment failures before deploying
$ rain forecast [template.yaml] [stack-name]
copy

SYNOPSIS

rain command [options] [arguments]

DESCRIPTION

rain is a development workflow tool for AWS CloudFormation that simplifies template authoring, validation, and stack management. It provides a more user-friendly interface than the standard AWS CLI for CloudFormation operations.
Key improvements over the AWS CLI include live deployment progress with colored output, automatic template formatting, template comparison, and deployment failure prediction. Rain can detect potential issues before deployment, saving time and reducing failed stack operations.
The tool supports CloudFormation modules and can package local artifacts like Lambda code for deployment. It handles the complexity of S3 bucket management for artifacts automatically.

PARAMETERS

ls

List CloudFormation stacks or changesets in the current region
deploy template stack-name
Deploy a CloudFormation stack from a local template
cat stack-name
Retrieve and display the template of a running stack
logs stack-name
Show the event log for the specified stack
rm stack-name
Delete a CloudFormation stack
fmt template
Format CloudFormation templates to a consistent style
diff template1 template2
Compare two CloudFormation templates
build resource-type
Create CloudFormation templates for specified resource types
forecast template stack-name
Predict potential deployment failures
pkg template
Package local artifacts for deployment (replacement for aws cloudformation package)
bootstrap
Create the S3 artifacts bucket for deployments
--region, -r region
Specify AWS region
--profile, -p profile
Use a specific AWS profile
--experimental, -x
Enable experimental commands
--help, -h
Display help information

CAVEATS

Requires AWS credentials configured via environment variables, AWS CLI profiles, or IAM roles. Ensure the AWS account has appropriate CloudFormation and related service permissions.
Some commands like forecast are experimental and require the -x flag. Experimental features may change between versions.
Rain operates on one region at a time. Use --region to specify a different region than the default.

HISTORY

Rain was developed by the AWS CloudFormation team and released as an open-source tool to improve the CloudFormation development experience. The name is a play on "what happens when you have a lot of CloudFormation." It is written in Go and actively maintained on GitHub.

SEE ALSO

aws(1), terraform(1), sam(1), cdk(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community