CloudFormation examples
In the CloudFormation example I provided, there's no Mappings section. Let me add an example of a Mappings section that's commonly tested in SAA-C03:
Mappings:
RegionMap:
us-east-1:
AMI: "ami-0b5eea76982371e91"
InstanceType: "t2.micro"
us-west-2:
AMI: "ami-0ceecbb0f30a902a8"
InstanceType: "t2.micro"
eu-west-1:
AMI: "ami-0d71ea30463e0ff8d"
InstanceType: "t2.micro"
EnvironmentMap:
dev:
InstanceType: "t2.micro"
MultiAZ: false
prod:
InstanceType: "t2.small"
MultiAZ: trueTo use these mappings, you would reference them like this:
The key things to remember about Mappings for the exam:
They provide a way to declare conditional values based on region, environment, etc.
Use
!FindInMapintrinsic function to retrieve valuesCommon uses include:
Region-specific AMI IDs
Instance types per environment
Configuration settings based on environment type
Different settings for different AWS regions
Other examples
Last updated
Was this helpful?