...

/

Components of CloudFormation Template File

Components of CloudFormation Template File

Explore the anatomy of the AWS CloudFormation template.

We'll cover the following...

A CloudFormation template is a script in JSON or YAML format that describes the stack to be built for our application deployment. Let’s look at the structure and sections of the AWS CloudFormation template.

Template sections

CloudFormation offers ten different sections in a template. Out of all the sections, only one is required, and the rest are optional. AWS recommends following this logical order while building the template:

  1. AWSTemplateFormatVersion (optional): This is the AWS CloudFormation template version. The only valid value is 2010-09-09, and this version must be declared as a literal string.

  2. Description (optional): This section is typically devoted to writing comments or a brief explanation of the purpose of this template. The value must be a literal string and cannot exceed 1024 ...