← 返回命令列表

Linux command

rain 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

List all CloudFormation stacks

rain ls

Deploy a CloudFormation template

rain deploy [template.yaml] [stack-name]

Get the template from a running stack

rain cat [stack-name]

Show event logs

rain logs [stack-name]

Format a CloudFormation template

rain fmt [template.yaml]

Compare two templates

rain diff [template1.yaml] [template2.yaml]

Delete a CloudFormation stack

rain rm [stack-name]

Predict deployment failures

rain forecast [template.yaml] [stack-name]

说明

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.

参数

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

FAQ

What is the rain command used for?

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.

How do I run a basic rain example?

Run `rain ls` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does ls do in rain?

List CloudFormation stacks or changesets in the current region