How to provide Default Values for AWS CloudFormation Parameters

AWS CloudFormation is very useful for creating template-able infrastructure definitions.

One of the sections of a template, is the Input Parameters, or simply Parameters as CloudFormation calls it. This is a section block that llows for user defined variables to be consumed by the template.

When testing, it can be useful to specify default values here.

This can be achieved by adding the Default key and setting a value.

Parameters: environment: Type: String Default: DEV vpcid: Type: String Default: "vpc-123456789123456a"
Code language: YAML (yaml)
Tags:
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments