CloudFormation – 5 – Parameters

Parameters from SSM

Consider such a yaml template:

Now let’s create the parameteres in SSM:

AWS Systems Manager -> Parameter Store -> Create parameter

Now go and create the second parameter. First copy the AMI Id.

And create parameter:

Create ->

And now go and create the stack

Next ->

The stack is being created. On the parameteres tab we see used parameteres and the values:

When we go to the created EC2 instance we see that instance type and the AMI is which was selected:


Now let’s change the value of an AMI parameter:

And update the stack:

Next -> Next ->

AMI of EC2 instance has been changed:


Public Parameters from SSM

Some AWS services publish information about common artifacts as AWS Systems Manager public parameters. For example, the Amazon Elastic Compute Cloud (Amazon EC2) service publishes information about Amazon Machine Images (AMIs) as public parameters.

Consider such a yaml template:

To obtain the list of all available linux AMI by AWS:

Or all available Windows AMI:

Let’s go and run this template:


Next -> Next

Create stack ->

As we see the value of the parameters has been resolved:

Read more at: