View
346
Download
6
Category
Tags:
Preview:
DESCRIPTION
Slides from the AWS-Atlanta meetup on using CloudFormation from 01/22/2014
Citation preview
AWS CloudFormation
From basic instance to AutoScale with extras
Presented by Adam Book from
Find me on LinkedIn
What is Cloud Formation
What is CloudFormation
AWS CloudFormation is a way to create and manage a group of AWS Resources in a templated fashion.
What is CloudFormation
Templates are written in JSON and can be moved from Region to Region.
• EC2• EBS• Elastic Load Balancers• Elastic IP Addresses• Auto Scaling Groups• EC2 Security Groups
• VPC Creation• Simple Storage Service (S3) buckets• Cloud Watch Alarms• AWS Identity & Access Management Policies• Much More
CloudFormation templates
A basic Template contains 5 Sections
1. Description2. Parameters3. Mappings4. Resources5. Outputs
CloudFormation templates
A basic Template contains 5 Sections
1. Description -2. Parameters 3. Mappings 4. Resources 5. Outputs
Template parameters hold a value and contain a list of attributes that define its value.
They are used in conjunction with Fn::GetAtt in the Resources section
CloudFormation templates
A basic Template contains 5 Sections
1. Description2. Parameters -3. Mappings 4. Resources 5. Outputs
Template parameters hold a value and contain a list of attributes that define its value.
They are used in conjunction with Fn::GetAtt in the Resources section
CloudFormation templates
A basic Template contains 5 Sections
1. Description2. Parameters3. Mappings -4. Resources 5. Outputs
Mappings tell the template which base AMI to use in which region.
Mappings can be used in conjunction parameters to ensure that Regional settings are met.
CloudFormation templates
A basic Template contains 5 Sections
1. Description2. Parameters3. Mappings4. Resources -5. Outputs
This is where your EC2 instances, S3 buckets, ELB’s and any other type of resources go.
CloudFormation templates
A basic Template contains 5 Sections
1. Description2. Parameters3. Mappings4. Resources 5. Outputs -
Return values produced by the template once launce is successfully completed.
CloudFormation templates
A bare bones Example:{ "AWSTemplateFormatVersion" : "version date", "Description" : "Valid JSON strings up to 4K",
"Parameters" : { keys and values },
"Mappings" : { keys and values },
"Resources" : { keys and values },
"Outputs" : { keys and values }}
Build from Examples
AWS already has lots of example templates ready for you to look at and build from.
http://aws.amazon.com/cloudformation/aws-cloudformation-templates/
Tools to help you validate
As you modify and customize the templates the json can get complex.
http://www.jsoneditoronline.org/
OR
http://jsonlint.com/
Launching a Template
To Launch a new Template click the Create New Stack button
We’ll use the EC2InstanceWithSecurityGroupsSample.template as our base
Launching a Template
Using Parameters
Launch
Tracking the Launch
View the template in CF Portal
Update the template
Trouble Shooting
Look at message of why CREATE FAILED
Recommended