πŸ”° Create High Availability Architecture with AWS CLI πŸ”°

Shobhit Singh Pal
2 min readDec 19, 2020

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.

Document Root(/var/www/html) made persistent by mounting on EBS Block Device

Created the volume as follows:

Attach the volume to ec2 instance:

Devices on ec2 instance:

Create partition, format partition and finally mount to /var/www/html:

fdisk /dev/xvdb2n(new partition)

enter four times and finally

w (save partition)

format partition and mount as follows:

With the mount now if your ec2-instance fail or terminate unexpectedly still the code will remain available.

How ?

Availability for each Amazon EC2 region:99.99%

Availability of each EBS volume:99.999% .

Setting up Content Delivery Network using CloudFront and using the origin domain as S3 bucket

Place the Cloud Front URL on the webapp code for security and low latency

in the body section we have put the static object image stored in s3 bucket.

Webserver configured on EC2 Instance

Install the httpd server

yum install httpd

Start the httpd service

Finally the webpage:

So we have created high availability aws architecture.

--

--