Lab 30 : Cloud Formation
- Get link
- X
- Other Apps
What is Cloud
Formation and why we use?
Cloud
Formation is a automation tools which allows you to create the infrastructure
of the aws services in less time and manage those resources and we can many
times.
Lab:Step 1: Pick a template
First, you’ll need a template that specifies that you
want in your stack.For this step,you use a sample template that is already
prepared.The sample template creates a basic wordpress blog that uses a single
amazon EC2 instance which a local mysql data base for storage.The template also
creates an amazon EC2 security group to control firewall settings the amazon
EC2 instance.
Step 2:Make sure you have prepared any required items
for the stack
Before you create a stack from a template,you must
ensure that all dependent resources that template requires are available,A template
can use or refer to both existing aws resources and resources declared in the template
itself,AWS Cloud Formation takes care of checking references to resources in
the template and also checks references to existing resources to Ensure that
they exist in the region where you are creating in the stack.If your template
refers to a dependent resource that does not Exist,Stack creation fails .
The Example wordpress template contains an input
parameters ,key name ,that specifies the key pair used for the amazon EC2 instance that is declared in the template.The
template depends on the user who creates a stack from the template to supply a
valid amazon EC2 key pair for the key name parameter.If you supply a valid key
pair name,the stack creates successfully if you don’t supply a valid key pair
name ,the stack is rolled back.
Make sure you have a valid amazon EC2 key pair and
record the key pair name before you create the stack.
Go to the EC2 dashboard Click on key pair
Create a key pair
Then click on Create
Step 3:Create the stack
Go to the cloud formation dashboard
Click create a stack
Select specify an amazon S3 template URL
Paste this URL
Click on Next
Give a stack name
Give a DB password should contain Alpha numeric
DB root password should contain Alpha numeric
DB user as root
Select key pair wordpress
Click on Next
Then Click on Next
You will get a review page
Then click on
Create
Stack Created
To view events of the stack
Click on Events
Execrise: Write a simple script for launching an EC2
instance and security groups create through cloud formation.
- Get link
- X
- Other Apps












Comments
Post a Comment