| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Create a new stack from a template stored in a local file or in an Amazon S3 bucket. If any resource defined in the template cannot be created, the stack will be rolled back, deleting all resources created up to that point. This behavior can be disabled by using the --disable-rollback option.
cfn-create-stack
StackName common-options
cfn-create-stack-options
The cfn-create-stack-options that you can specify are described in the Options section of this topic.
| Name | Description | Required |
|---|---|---|
|
|
Name of the Stack. 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
Type: String Default: None Example: websrv |
Yes |
|
|
Flag to disable rollback of created resources when failures are encountered during stack
creation. The default value is Type: String Default: None |
No |
|
|
Path to the file that contains the template. An uploaded template can be, at most, 51200 bytes. Type: String Default: None |
No |
|
|
SNS ARNs to receive notification about the stack. Type: String Default: None |
No |
|
|
Parameter values used to create the stack. Type: String Default: None |
No |
|
|
Stack creation timeout in minutes. Type: String Default: None |
No |
|
|
A set of user-defined Tags to associate with this stack, represented by key/value pairs. This option can be repeated to specify a number of such pairs. Type: String Example: |
No |
|
|
Path of the URL that contains the template. 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 |
|
|
The list of capabilities that you want to allow in the stack. If your template 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, AWS::IAM::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.
Create a Stack named example-stack using template located in file
example-template-file and specifying template parameters param1 and
param2.
> cfn-create-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