AWS - CloudFormationWhich 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.yamlBaws cloudformation create-stack --stack-name MyStack --template-body file://template.yamlCaws cloudformation deploy --stack MyStack --template-file template.yamlDaws cloudformation start-stack --stack-name MyStack --template-body template.yamlCheck Answer
Step-by-Step SolutionSolution:Step 1: Recall correct CLI syntax for stack creationThe command uses 'create-stack', '--stack-name', and '--template-body' with 'file://' prefix.Step 2: Check each optionaws cloudformation create-stack --stack-name MyStack --template-body file://template.yaml matches correct syntax; others use wrong flags or commands.Final Answer:aws cloudformation create-stack --stack-name MyStack --template-body file://template.yaml -> Option BQuick 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-nameMissing file:// prefix for local templatesUsing wrong commands like deploy or start-stack
Master "CloudFormation" in AWS9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More AWS Quizzes Advanced Security - KMS for key management - Quiz 9hard Advanced Security - Why defense in depth matters - Quiz 10hard Advanced Security - Why defense in depth matters - Quiz 5medium Architecture Best Practices - Multi-tier architecture patterns - Quiz 14medium CloudFormation - Outputs for cross-stack references - Quiz 3easy CloudFormation - Stack drift detection - Quiz 9hard Cost Optimization - Budgets and cost anomaly detection - Quiz 2easy EKS - kubectl configuration for EKS - Quiz 2easy Route 53 - Health checks with Route 53 - Quiz 10hard Route 53 - Health checks with Route 53 - Quiz 1easy