AWS CloudFormation Init with Examples

Nidhi
4 min readFeb 12, 2021

In this blog, we will explore AWS CloudFormation Init and will create an example of using all the cfn-init concepts

Agenda

  1. Basics of CloudFormation::Init
  2. cfn-init
  3. cfn-signal
  4. cfn-hup

AWS::CloudFormation::Init

Use the AWS::CloudFormation::Init type to include metadata on an Amazon EC2 instance

AWS::CLOUDFORMATION::INIT: RESOURCE METADATA

"Resources": {
"MyInstance": {
"Type": "AWS::EC2::Instance",
"Metadata" : {
"AWS::CloudFormation::Init" : {
"config" : {
"packages" : { },
"groups" : { },
"users" : { },
"sources" : { },
"files" : { },
"commands" : { },
"services" : { }
}
}
},
"Properties": { }
}
}

--

--