What Is the Default Scripting Language for CloudFormation?


Larry Thompson

When working with AWS CloudFormation, you may come across the term “scripting language.” But what exactly is the default scripting language for CloudFormation?

The Power of CloudFormation

AWS CloudFormation is a powerful service that allows you to define and provision your infrastructure as code. With CloudFormation, you can create and manage AWS resources by writing templates in a scripting language.


CloudFormation supports two types of scripting languages: JSON (JavaScript Object Notation) and YAML (YAML Ain’t Markup Language). These languages are used to describe the desired state of your cloud infrastructure.

JSON is a lightweight data-interchange format that is easy for humans to read and write. It uses key-value pairs and arrays to represent data. JSON templates use curly braces ({}) and square brackets ([]) to define objects and arrays, respectively.

YAML, on the other hand, is a human-readable data serialization format. It aims to be less verbose than JSON while maintaining readability. YAML templates use indentation and colons (:) to define objects and key-value pairs.

The Default Scripting Language

The default scripting language for AWS CloudFormation is JSON. When you create a template using the AWS Management Console or the AWS Command Line Interface (CLI), it will generate a JSON template by default.

However, you can also choose to write your templates in YAML if you prefer. Both JSON and YAML templates are functionally equivalent, so it’s up to personal preference which one you use.

Using JSON or YAML Templates

To create an AWS CloudFormation stack using a template, you can either upload the template file directly or provide the template body as a string.

If you choose to write your template in JSON, make sure the file has a .json extension. If you prefer YAML, use the .yaml or .yml extension. When using the AWS Management Console, you can select the appropriate file type when uploading your template.


In summary, AWS CloudFormation supports both JSON and YAML scripting languages. While JSON is the default scripting language, you have the flexibility to choose YAML if it suits your preferences better. Both languages offer a structured and easy-to-read way of defining your cloud infrastructure as code.

Now that you know the default scripting language for CloudFormation, you can start creating templates and provisioning your infrastructure with ease!

Discord Server - Web Server - Private Server - DNS Server - Object-Oriented Programming - Scripting - Data Types - Data Structures

Privacy Policy