अर्थ TASK-6

Mangal Hansdah
3 min readSep 30, 2021

DESCRIPTION:-🔰 Create High Availability Architecture with AWS CLI 🔰
🔅The architecture includes-
- Webserver configured on EC2 Instance
- Document Root(/var/www/html) made
persistent by mounting on EBS Block Device.
- Static objects used in code such as
pictures stored in S3
- Setting up Content Delivery Network using
CloudFront and using the origin domain as S3 bucket.
- Finally place the Cloud Front URL on the
webapp code for security and low latency.

:- we have already create an instances using cli in previous task.so let’s start the instances before starting the instances we have to pick the instance id by using command:-

aws ec2 describe-instances

instance is stopped right now.

:- so let’s start the instances using instances id by using command:-

aws ec2 start-instance — instance-ids

:- Now in this instance we will quickly configure the webserver.

  1. First we need to install httpd:-

command are :-

1. cd /var/www/html

in this directory/folder we have to create a file.

2. so we create a file with extension html

web.html

all the web pages are stored in this file .

3.so start the service using command :-

systemctl enable httpd

we have to create 1 ebs volume which serve as document root device.

2. to attach ebs volume to ec2 instance

To make document root

/var/www/html of web server we have to mount it on EBS volume.

Now,

3. we have to put the static content like images used in web into the s3 bucket.for these we have to create one s3 bucket.

confirmation in webui.

Now here the link of this uploaded image .

now the web page look like:-

to access this page we are now

4. To create cloud front distribution for our s3 bucket objects.

we see that cloudfront service of aws provides one domain to access the content with high speed and low latency .

5. Now after updating the code we get the final web page ;

--

--