CloudFormation commands

aws configure --profile <my-profile>
export AWS_PROFILE=<my-profile>
aws cloudformation validate-template --template-body file://./template.yml
aws cloudformation create-stack \
  --stack-name <my-stack> \
  --template-body file://./template.yml \
  --parameters ParameterKey=Initials,ParameterValue=<my-initials>
aws cloudformation describe-stacks --stack-name <my-stack>
aws cloudformation update-stack \
  --stack-name <my-stack> \
  --template-body file://./template.yml \
    --parameters ParameterKey=Initials,ParameterValue=<my-initials>
aws cloudformation create-change-set \
  --stack-name <my-stack> \
  --template-body file://./template.yml \
  --parameters ParameterKey=Initials,ParameterValue=<my-initials> \
  --change-set-name changeset-1

aws cloudformation describe-change-set \
  --stack-name <my-stack> \
  --change-set-name changeset-1 | jq '.Changes[]'

aws cloudformation execute-change-set \
  --stack-name <my-stack> \
  --change-set-name changeset-1
watch -n1 "aws cloudformation describe-stacks --stack-name <my-stack> | jq '.Stacks[0].StackStatus'"
aws cloudformation delete-stack --stack-name <my-stack>
  • cloudformation.txt
  • Last modified: 2019/06/02 17:52
  • by jdx