Bird
0
0

Which of the following is the correct AWS CLI command to create a stack named 'MyStack' using a template file 'template.yaml'?

easy📝 Syntax Q3 of 15
AWS - CloudFormation
Which of the following is the correct AWS CLI command to create a stack named 'MyStack' using a template file 'template.yaml'?
Aaws cloudformation create-stack --name MyStack --template file://template.yaml
Baws cloudformation create-stack --stack-name MyStack --template-body file://template.yaml
Caws cloudformation deploy --stack MyStack --template-file template.yaml
Daws cloudformation start-stack --stack-name MyStack --template-body template.yaml
Step-by-Step Solution
Solution:
  1. Step 1: Recall correct CLI syntax for stack creation

    The command uses 'create-stack', '--stack-name', and '--template-body' with 'file://' prefix.
  2. Step 2: Check each option

    aws cloudformation create-stack --stack-name MyStack --template-body file://template.yaml matches correct syntax; others use wrong flags or commands.
  3. Final Answer:

    aws cloudformation create-stack --stack-name MyStack --template-body file://template.yaml -> Option B
  4. Quick Check:

    Correct CLI syntax = B [OK]
Quick Trick: Use --stack-name and --template-body with file:// prefix [OK]
Common Mistakes:
  • Using --name instead of --stack-name
  • Missing file:// prefix for local templates
  • Using wrong commands like deploy or start-stack

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes