Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is double colon in yaml ? I'm seeing in AWS Cloud Formation

I'm sorry if this is a noob question for you but I seriously don't understand the double colon here. What does it mean ?

"Type": "AWS::EC2::KeyPair::KeyName"

I understand basic YAML syntax and couldn't find an explanation for this.

like image 618
Taha Avatar asked May 29 '18 21:05

Taha


People also ask

What are the sections of a CloudFormation template?

A CloudFormation template consists of 6 sections – Description, Parameters, Mappings, Conditions, Resources and Outputs. Only the Resources section is required. However, as a good practice, we highly recommend using all the sections of a template.

Does cloud formation use YAML?

AWS CloudFormation supports the YAML Version 1.1 specification with a few exceptions. AWS CloudFormation doesn't support the following features: The binary , omap , pairs , set , and timestamp tags. Aliases.

What is Yml file in AWS?

The application specification file (AppSpec file) is a YAML -formatted or JSON-formatted file used by CodeDeploy to manage a deployment. The AppSpec file for an EC2/On-Premises deployment must be named appspec. yml or appspec. yaml , unless you are performing a local deployment.

What is rules in CloudFormation?

A rule can include a RuleCondition property and must include an Assertions property. For each rule, you can define only one rule condition. You can define one or more asserts within the Assertions property. If you don't define a rule condition, the rule's assertions always take effect.


1 Answers

The double colon aren't related to YAML. In fact, they've been around since the beginning of CloudFormation in JSON. AWS::EC2::KeyPair::KeyName is just the way AWS decided to name their resource types. They could have gone for AWS_EC2_KeyPair_KeyName or anything else for that matter.

like image 158
Laurent Jalbert Simard Avatar answered Sep 27 '22 22:09

Laurent Jalbert Simard