How to provide Default Values for AWS CloudFormation Parameters

0 min read 80 words

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"
Tags:
Andrew
Andrew

Andrew is a visionary software engineer and DevOps expert with a proven track record of delivering cutting-edge solutions that drive innovation at Ataiva.com. As a leader on numerous high-profile projects, Andrew brings his exceptional technical expertise and collaborative leadership skills to the table, fostering a culture of agility and excellence within the team. With a passion for architecting scalable systems, automating workflows, and empowering teams, Andrew is a sought-after authority in the field of software development and DevOps.

Tags