| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Update an existing stack from a template stored in a local file or in an Amazon S3 bucket. If any resource defined in the updated template cannot be updated, the stack will be rolled back to the stack configuration of the previous template.
For detailed information about creating an update template, updating a stack, and monitoring its progress, see Updating AWS CloudFormation Stacks.
cfn-update-stack
StackName
common-options
| Name | Description | Required |
|---|---|---|
|
|
Name or stack ID of the stack to update. A stack name must contain only alphanumeric characters and must start with an alphabetic character. The maximum length of the name is 255 characters. Stack names are case sensitive. You can also set this value using "--stack-name". Type: String Default: None Example: websrv |
Yes |
|
|
Path to the file that contains the template with the updated stack information. An uploaded template can be, at most, 51200 bytes. Type: String Default: None |
No |
|
|
Path of the URL that contains the template with the updated stack information. The URL must point to a template (max size: 307,200 bytes) in an Amazon S3 bucket that you have read permissions to, located in the same region as the stack. The URL itself can be, at most, 1024 characters long. Type: String Default: None |
No |
|
|
Parameter values used to update the stack. Type: String Default: None |
No |
|
|
The list of capabilities that you want to allow in the stack. If your stack contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter; otherwise, this action returns an InsufficientCapabilities error. IAM resources are the following: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::Policy, UserToGroupAddition, and AWS::IAM::User. For more information about using IAM resources in templates, see Controlling User Access with AWS Identity and Access Management. Type: String Valid Values: CAPABILITY_IAM Default: None |
No |
This command returns a table that contains the following:
STACK_ID
Unique Identifier for the stack
AWS CloudFormation displays errors on stderr.
Update a Stack named example-stack using template located in file
example-template-file and specifying template parameters param1 and
param2.
> cfn-update-stack example-stack --template-file example-template-file --parameters "param1=foo;param2=bar"
arn:aws:aws21:us-east-1:123456789:stack/aaf549a0-a413-11df-adb3-5081b3858e83/example-stack