Scenario:
- We need to create CloudFormation stack with certain set of resources like Lambda, API Gateway, DynamoDB, ElasticSearch etc.
- These stacks needs to be deployed in multiple regions, to be more specific 5 different regions like Oregon, Sydney etc.
- Each stack has different configuration based on a region e.g. DynamoDB auto-scaling values are different for each region and Lambda concurrency or Instance types for ElasticSearch etc. are region specific.
What we currently doing:
Currently we have a single CloudFormation template with Mappings defined for region specific values. i.e. we are using condition functions like if-else to check current AWS region and based on that we select the mapping for that region.
Problem:
- As the need grows to support more and more regions the size of mappings also increasing
- For each new resource getting added we need to update mapping to add the configuration for new resource
- Supporting multiple regions and resource configurations along with conditions becoming unmanageable
Expectation:
We are looking for a comprehensive solution to support multiple regions using the same CloudFormation template and need to get rid of mappings and find more manageable way to handle region specific configurations.
Any help is highly appreciated.
{% include %}
and passing runtime values in. This way your existing templates would remain largely intact. – jarmod