Bird
0
0

Given this AWS CLI command:

medium📝 service behavior Q13 of 15
AWS - CloudFormation
Given this AWS CLI command:
aws cloudformation create-stack --stack-name TestStack --template-body file://template.yaml --parameters ParameterKey=Env,ParameterValue=prod
What will happen when this command runs?
AThe command will fail because parameters must be in JSON format
BThe stack will be created with default parameter values ignoring Env
CThe stack will be created but the Env parameter will be ignored
DA stack named TestStack is created using the template with Env parameter set to prod
Step-by-Step Solution
Solution:
  1. Step 1: Understand parameter usage in create-stack command

    The --parameters option allows passing key-value pairs to customize the stack.
  2. Step 2: Check the syntax correctness

    The syntax ParameterKey=Env,ParameterValue=prod is valid for AWS CLI parameters.
  3. Final Answer:

    A stack named TestStack is created using the template with Env parameter set to prod -> Option D
  4. Quick Check:

    Parameters customize stack creation [OK]
Quick Trick: Parameters use ParameterKey= and ParameterValue= pairs [OK]
Common Mistakes:
  • Thinking parameters must be JSON
  • Assuming parameters are ignored if passed
  • Confusing parameter syntax with other commands

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes