Chapter 7 AWS Boot Strap Scripts

AWS Boot Strap Scripts

Boot Strap Scripts automates EC2 deployment and its process.  By Doing Bootstrap scripting, tasks become easier. Let’s understand it’s practical and will learn its uses.

Example: Suppose user wants to create one EC2 instance and when EC2 ip address (html url) is clicked in browser then “Hello World” message should be published.

Step 1: Create EC2 Instance and navigate Configure Instance Details tab:

Select IAM role as AdminAccess.

After this, Navigate to Advance Details. Enter commands to execute step by step.

In this, each command will be executed step by step.

If you want to display something please add it .

sudo su

yum update -y

yum install httpd -y

service httpd start

chkconfig httpd on

echo “<html><h1>hello world</h1></html>

echo “<html><h1>hello world</h1></html>

it will print hello world in the website url(ip address).

Step 3: Complete remaining steps and launch EC2 Instance. Once IP address is available then check with url

It will show:

Hello world.

***********************************************************************

Important Points:

If you want to get information about your EC2 instance, then type below curl command:

curl http://1 69.254.1 69.254/1atest/meta-data/ 
curl http://1 69.254.1 69.254/1atest/user-data/

*************************************************************************************

What is Placement Groups in AWS?

This specifies a placement group in which to launch EC2 instances. The strategy of the placement group determines how the instances are organized within the group.

What are different types of Placement Groups?

cluster placement group

spread placement group

partition placement group

What is cluster placement group?

A cluster placement group is a grouping of instances within a single Availability Zone. Placement groups

are recommended for applications that need low network latency, high network throughput, or both.

Only certain instances can be launched in to a Clustered Placement Group.

What is Spread placement group?

A spread placement group is a group of instances that are each placed on distinct hardware. Spread placement groups are recommended for applications that have a small number of critical instances that should be kept separate from each other. THINK like it is an INDIVIDUAL INSTANCES.

 What is partition placement group?

partition placement group places groups of instances in different partitions, where instances in one partition do not share the same hardware with instances in another partition.

When using partition placement groups, Amazon EC2 divides each group into logical segments called partitions. Amazon EC2 ensures that each partition within a placement group has its own set of racks. Each rack has its own network and power source. No two partitions within a placement group share the same racks, allowing you to isolate the impact of hardware failure within your application.

THINK like it is MULTIPLE INSTANCES.

************************************************************************

  •  in the volume to Amazon S3, where it is stored in multiple Availability Zones.

For latest updates please join FB group cloudvikas.com (search in FaceBook) or click on link Cloudvikasgroup