Bootstrapping Applications using AWS CloudFormation

Community Contributed Software

Amazon Web Services provides links to these packages as a convenience for our customers,
but software not authored by an "@AWS" account has not been reviewed or screened by AWS.

Please review this software to ensure it meets your needs before using it.

If you are installing and configuring your applications on EC2 dynamically at instance launch time, you will typically need to pull and install packages, deploy files and ensure services are started. AWS CloudFormation provides a set of helper scripts that, in conjunction with resource metadata defined in the template, can be used to install software and start services when you build your stack.

1/12/2015: The source distribution's dependency on python-daemon has been locked to pre-2.0 versions. S3 URLs with spaces can now be downloaded from region-specific S3 endpoints. The certificate bundle can be overriden by a PEM-encoded cert bundle at /etc/cfn/ca-override.pem or %SYSTEMDRIVE%\cfn\ca-override.pem

11/06/2014: Ability to use cfn-signal in conjunction with CreationPolicy as per the details here

AWS CloudFormation provides the following helpers to allow you to deploy your application code or application and OS configuration
at the time you launch your EC2 instances:

cfn-init: Used to retrieve and interpret the resource metadata, installing packages, creating files and starting services.

cfn-signal: A simple wrapper to signal a CloudFormation WaitCondition allowing you to synchronize other resources in the stack with the application being ready.

cfn-get-metadata: A wrapper script making it easy to retrieve either all metadata defined for a resource or path to a specific key or subtree of the resource metadata.

cfn-hup: A daemon to check for updates to metadata and execute custom hooks when the changes are detected.

These scripts are installed by default on the latest Amazon Linux AMI in /opt/aws/bin. They are also available in the Amazon Linux AMI yum repository for previous versions of the Amazon Linux AMI as well as via RPM for other Linux/Unix distributions. The scripts can also be installed on Microsoft Windows using Python for Windows.

The AWS helper scripts are available in the Amazon Linux AMI yum repository (the package name is aws-cfn-bootstrap) for previous versions of the Amazon Linux AMI.