Using mappings to specify regional AMI IDs

The mappings section is used to define a set of key/value pairs. If you require any kind of AWS region portability, perhaps for disaster recovery (DR) or availability purposes, or simply to get your application closer to your end user, you'll almost certainly need to specify some mappings in your template. This is particularly necessary if you are referencing anything in your template that is region specific.

The canonical example would be to specify a map of EC2 AMI IDs in your template. This is because AMIs are a region-specific resource, so a reference to a valid Amazon Machine Image (AMI) ID in one region, will be invalid in another. In this recipe, you will create a CloudFormation stack that allows a user to choose between an instance with Linux or Windows.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset