Complete the code to create a new CloudFormation stack using AWS CLI.
aws cloudformation create-stack --stack-name MyStack --template-body file://template.yaml --[1]The --region option specifies the AWS region where the stack will be created. Here, us-west-2 is used.
Complete the code to update an existing CloudFormation stack with a new template file.
aws cloudformation update-stack --stack-name MyStack --template-body file://[1]To update a stack, you provide the new template file. Here, new-template.yaml is the updated template.
Fix the error in the command to delete a CloudFormation stack.
aws cloudformation [1]-stack --stack-name MyStackThe correct AWS CLI command to delete a stack is delete-stack.
Fill both blanks to create a stack with parameters and specify the region.
aws cloudformation create-stack --stack-name MyStack --template-body file://template.yaml --parameters ParameterKey=InstanceType,ParameterValue=[1] --[2]
The instance type parameter is set to t3.micro, and the region is specified as us-east-1.
Fill all three blanks to update a stack with a new template, specify a parameter, and set the region.
aws cloudformation update-stack --stack-name MyStack --template-body file://[1] --parameters ParameterKey=KeyName,ParameterValue=[2] --[3]
The stack is updated with new-template.yaml, the key pair parameter is set to my-keypair, and the region is us-west-2.