CloudFormation Parameters

Parameters are important to be able to customize your ideally general templates. There are discussions that parameters are limiting when it comes to customization, I don’t agree, you can pass them in via defaults or from the AWS CLI when you create/update stacks.

A very clever approach is to design a layered approach as follows which makes it a snap to create predictable copies of your stack, combine it with parameters that allow you to easily size the stacks and you can have tiny development stacks and right sized test and production stacks:

Environment layer

Stack Layer

Nested Layers

Example:

DEV

TEST

PROD

STACK

NETWORK

SECURITY

RDS

S3

CLOUDWATCH

ECS

CloudFormation Nesting & Parameters

CloudFormation has a limit to be able to pass in only 60 parameters to a nested template. It has it for a good reason.

Even in complex nesting scenarios there is never the need to have so many parameters, if you end up in this scenario that you are getting close or are even exceeding that limit, then strongly consider that your stack architecture was driven by speed and not proper design. Rethink how you nest, rethink your approach and refactor.

Be the first to comment on "CloudFormation Parameters"

Leave a comment

Your email address will not be published.


*