+ All Categories
Home > Technology > AWS Cloud Formation

AWS Cloud Formation

Date post: 15-Jan-2015
Category:
Upload: adam-book
View: 346 times
Download: 6 times
Share this document with a friend
Description:
Slides from the AWS-Atlanta meetup on using CloudFormation from 01/22/2014
Popular Tags:
21
AWS CloudFormation From basic instance to AutoScale with extras
Transcript
Page 1: AWS Cloud Formation

AWS CloudFormation

From basic instance to AutoScale with extras

Page 2: AWS Cloud Formation

Presented by Adam Book from

Find me on LinkedIn

What is Cloud Formation

Page 3: AWS Cloud Formation

What is CloudFormation

AWS CloudFormation is a way to create and manage a group of AWS Resources in a templated fashion.

Page 4: AWS Cloud Formation

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

Page 5: AWS Cloud Formation

CloudFormation templates

A basic Template contains 5 Sections

1. Description2. Parameters3. Mappings4. Resources5. Outputs

Page 6: AWS Cloud Formation

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

Page 7: AWS Cloud Formation

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

Page 8: AWS Cloud Formation

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.

Page 9: AWS Cloud Formation

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.

Page 10: AWS Cloud Formation

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.

Page 11: AWS Cloud Formation

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 }}

Page 12: AWS Cloud Formation

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/

Page 13: AWS Cloud Formation

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/

Page 14: AWS Cloud Formation

Launching a Template

To Launch a new Template click the Create New Stack button

We’ll use the EC2InstanceWithSecurityGroupsSample.template as our base

Page 15: AWS Cloud Formation

Launching a Template

Page 16: AWS Cloud Formation

Using Parameters

Page 17: AWS Cloud Formation

Launch

Page 18: AWS Cloud Formation

Tracking the Launch

Page 19: AWS Cloud Formation

View the template in CF Portal

Page 20: AWS Cloud Formation

Update the template

Page 21: AWS Cloud Formation

Trouble Shooting

Look at message of why CREATE FAILED


Recommended