AWS - CloudFormationHow can you reference a value from a mapping in a CloudFormation template to select an AMI ID based on region?AUse the Fn::GetAtt function on the mappingBUse the Ref function on the mapping nameCUse the Fn::FindInMap intrinsic functionDUse the Outputs section to retrieve mapping valuesCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand mapping usageMappings store static key-value pairs like region to AMI mappings.Step 2: Identify correct intrinsic functionFn::FindInMap retrieves values from mappings using keys.Step 3: Differentiate from other functionsRef returns parameters or resources, GetAtt gets resource attributes, Outputs expose values but do not retrieve mapping data.Final Answer:Use the Fn::FindInMap intrinsic function -> Option CQuick Check:Mapping lookup = Fn::FindInMap = A [OK]Quick Trick: Use Fn::FindInMap to get values from mappings [OK]Common Mistakes:Using Ref on mappingsUsing GetAtt for mappingsExpecting Outputs to retrieve mappings
Master "CloudFormation" in AWS9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More AWS Quizzes Architecture Best Practices - Reliability pillar principles - Quiz 2easy CloudFormation - Updating and deleting stacks - Quiz 7medium Cost Optimization - Budgets and cost anomaly detection - Quiz 5medium ECS and Fargate - Fargate vs EC2 launch type - Quiz 14medium EKS - Why managed Kubernetes matters - Quiz 12easy EKS - Node groups (managed, self-managed, Fargate) - Quiz 7medium Route 53 - Hosted zones concept - Quiz 11easy Route 53 - Why DNS management matters - Quiz 8hard Route 53 - Health checks with Route 53 - Quiz 14medium Serverless Architecture - Serverless Application Model (SAM) - Quiz 14medium