Skip to content

cfnrain

cfnrain is a command line tool for AWS CloudFormation templates and stacks. It deploys stacks through change sets, packages local files into templates, formats templates, and shows stack logs.

cfnrain is a community fork of AWS CloudFormation Rain, which AWS archived on 2026-07-29. It works as a replacement for Rain v1.24.4. See Migrating from rain.

Not an AWS project

cfnrain is not affiliated with or endorsed by Amazon Web Services.

What cfnrain does

  • Deploys stacks with change sets. cfnrain deploy asks for parameter values, shows the change set, and waits for your confirmation. Then it shows the progress and prints a summary with any failure messages.
  • Adds features to templates. Template directives such as !Rain::Embed and !Rain::S3 put file contents or S3 locations into a template. Modules split one template into many files.
  • Formats templates. cfnrain fmt writes templates in one consistent style, keeps your comments, and converts between JSON and YAML.
  • Shows stack logs. cfnrain logs shows the events of a stack and its nested stacks, and hides the events that are not interesting.

Where to start

  1. Install cfnrain.
  2. Do your first deploy.
  3. Read how deploys work.
  4. Use cfnrain in CI.

Project