CloudFormation is an API based interface for managing resources and every resource is an object with properties and behavior. But what happens with resources like EC2 instances where CloudFormation doesn't have any control over the operating system and internal processes? The instance status changes to Running and CloudFormation understands that the final state of the object has been reached successfully.
Amazon Linux images incorporate scripts to perform the following activities:
cfn-init
Installs software packages, parses metadata, creates files into disk, and configures operating system services declaratively.
In the previous example, the AWS::CloudFormation::Init type will do the following activities:
- Install the httpd server using the latest stable version using the yum package manager
- Create the file /var/www/html/index.html with the content string...