Creating a High Availability Architecture with AWS CLI
Problem Statement
✳️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.
All the above steps must be performed using AWS CLI
Solution Steps:-
Step1:- Download AWS CLI and configure it.
Step2:- Start an instance
Step3:- Create an EBS volume and then attach it to the instance.
Step4:- Now attach the volume to the instance.
Before using this attached volume , it must be partitioned and formatted first.
Step5:- PARTITIONING :
press enter (it will be first partition only)
press enter (it will be counting the space from initial sector)
w (save the partition and exit)
Step6:- FORMAT the partition with ext4 :
Step7:- Now Install httpd server using yum command
Step8:- Start the httpd service:
Check the status of the service:
Step9:- Now , Mount the /var/www/html folder to the created partition of the EBS volume
To check the web server configuration create a small code and access it through the webUI
NOTE : save the code in /var/www/html directory.
good work geetansh 👍