Difference between revisions of "Aws cloudformation deploy"

From wikieduonline
Jump to navigation Jump to search
 
(47 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{lowercase}}
 
<code>[[aws cloudformation]] deploy</code>
 
<code>[[aws cloudformation]] deploy</code>
* https://docs.aws.amazon.com/cli/latest/reference/cloudformation/deploy/index.html
+
* https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/deploy/index.html
  
 +
 +
== Examples ==
 +
[[aws cloudformation]] deploy --template-file .../...
 +
 +
[[aws cloudformation deploy --template-file]] /path_to_template/template.json [[--stack-name]] my-new-stack [[--parameter-overrides]] Key1=Value1 Key2=Value2 --tags Key1=Value1 Key2=Value2
 +
 +
Example:
 +
aws cloudformation deploy [[--template-file]]  /path_to_template/template.json --stack-name my-new-stack-name --parameter-overrides [[BucketName]]=YourBucketName
 +
 +
=== Successfully example: ===
 +
Waiting for changeset to be created..
 +
[[Waiting for stack create/update to complete]]
 +
Successfully created/updated stack - YOUR-STACK-NAME
 +
 +
=== Up to date example: ===
 +
Waiting for changeset to be created..
 +
No changes to deploy. Stack YOUR-STACK-NAME is up to date
 +
 +
=== Error ===
 +
Failed to create/update the stack. Run the following command
 +
to fetch the list of events leading up to the failure
 +
[[aws cloudformation describe-stack-events]] --stack-name YOUR-STACK-NAME
 +
 +
== Synopsys: ==
 +
  deploy
 +
--template-file <value>
 +
--stack-name <value>
 +
[--s3-bucket <value>]
 +
[--force-upload]
 +
[--s3-prefix <value>]
 +
[--kms-key-id <value>]
 +
[--parameter-overrides <value> [<value>...]]
 +
[--capabilities  [[CAPABILITY_IAM]] | [[CAPABILITY_NAMED_IAM]]]
 +
[--no-execute-changeset]
 +
[--role-arn <value>]
 +
[--notification-arns <value> [<value>...]]
 +
[--fail-on-empty-changeset | --no-fail-on-empty-changeset]
 +
[--tags <value> [<value>...]]
 +
 +
== Related ==
 +
* <code>[[cfn-lint]]</code>
 +
* <code>[[aws cloudformation create-stack]]</code>
 +
* <code>[[aws cloudformation update-stack]]</code>
 +
* <code>[[aws cloudformation delete-stack]]</code>
 +
* <code>[[terraform apply]]</code>
 +
* <code>[[--parameter-overrides]]</code>
 +
* [[Cloudformation AWS::S3::Bucket example]]
 +
* <code>[[aws cloudformation describe-stack-events]] --stack-name your_stack_name | egrep "[[LogicalResourceId]]|[[ResourceStatus]]"</code>
 +
* <code>[[CREATE_FAILED]], [[ROLLBACK_COMPLETE]]</code>
 +
 +
== Errors ==
 +
An error occurred ([[ValidationError]]) when calling the [[CreateChangeSet]] operation: Stack:arn:aws:cloudformation:eu-central-1:123456564:stack/your_stack_name/bb3f1fb0-b019-11ec-a417-123124342 is in [[ROLLBACK_COMPLETE]] state and can not be updated.
 +
 +
An error occurred ([[ValidationError]]) when calling the [[CreateChangeSet]] operation: [[CloudFormation Parameters|Parameters:]] [YourParameter] must have value
 +
 +
['./path/to/your/file/[[.env]]'] value passed to [[--parameter-overrides]] must be of format [[Key=Value]]
 +
 +
An error occurred ([[ValidationError]]) when calling the [[CreateChangeSet]] operation: Template format error: [[Unresolved resource dependencies]] [YOUR_VAR1, YOUR_VAR2] in the [[Resources]] block of the template.
  
 
== See also ==
 
== See also ==
 +
* {{aws cloudformation deploy}}
 
* {{aws cloudformation}}
 
* {{aws cloudformation}}
  
 
[[Category:Cloudformation]]
 
[[Category:Cloudformation]]

Latest revision as of 08:47, 16 May 2022

aws cloudformation deploy


Examples[edit]

aws cloudformation deploy --template-file .../...
aws cloudformation deploy --template-file /path_to_template/template.json --stack-name my-new-stack --parameter-overrides Key1=Value1 Key2=Value2 --tags Key1=Value1 Key2=Value2

Example:

aws cloudformation deploy --template-file  /path_to_template/template.json --stack-name my-new-stack-name --parameter-overrides BucketName=YourBucketName

Successfully example:[edit]

Waiting for changeset to be created..
Waiting for stack create/update to complete
Successfully created/updated stack - YOUR-STACK-NAME

Up to date example:[edit]

Waiting for changeset to be created..
No changes to deploy. Stack YOUR-STACK-NAME is up to date

Error[edit]

Failed to create/update the stack. Run the following command
to fetch the list of events leading up to the failure
aws cloudformation describe-stack-events --stack-name YOUR-STACK-NAME

Synopsys:[edit]

  deploy
--template-file <value>
--stack-name <value>
[--s3-bucket <value>]
[--force-upload]
[--s3-prefix <value>]
[--kms-key-id <value>]
[--parameter-overrides <value> [<value>...]]
[--capabilities   CAPABILITY_IAM | CAPABILITY_NAMED_IAM]
[--no-execute-changeset]
[--role-arn <value>]
[--notification-arns <value> [<value>...]]
[--fail-on-empty-changeset | --no-fail-on-empty-changeset]
[--tags <value> [<value>...]]

Related[edit]

Errors[edit]

An error occurred (ValidationError) when calling the CreateChangeSet operation: Stack:arn:aws:cloudformation:eu-central-1:123456564:stack/your_stack_name/bb3f1fb0-b019-11ec-a417-123124342 is in ROLLBACK_COMPLETE state and can not be updated.
An error occurred (ValidationError) when calling the CreateChangeSet operation: Parameters: [YourParameter] must have value
['./path/to/your/file/.env'] value passed to --parameter-overrides must be of format Key=Value
An error occurred (ValidationError) when calling the CreateChangeSet operation: Template format error: Unresolved resource dependencies [YOUR_VAR1, YOUR_VAR2] in the Resources block of the template.

See also[edit]

Advertising: