High Availability Architecture with AWS CLI

Karan Agrawal
3 min readJan 12, 2021


The architecture includes-

  • Creating and Configuring the Web Server
  • Creating the EBS storage and Document Root(/var/www/html) mounting on it
  • Storing the Static object in the S3
  • Setting up the Content Delivery Network using CloudFront and using the origin domain as an S3 bucket.
  • Finally, place the Cloud Front URL on the web app code for security and low latency.

1. Configure the AWS and Provide Credentials.

2. Launch an EC2 Instance.

3. Connect to Instance and Install Apache Web Server in it.

4. Create EBS Volume in the same region as Instance.

5. Attach the volume to the EC2 Instance.

6. Create the Partition and Format it.

7. Mount the Volume in the root directory of the webserver, i.e. /var/www/html.

8. Create an S3 Bucket.

9. Copy any Image in the bucket.

10. Create a Cloudfront Distribution with the above-created bucket.

11. Write HTML Code in Instance using link of image from Cloudfront Distribution.

12. Start the service.

Finally, Highly Available Infrastructure from AWS has been Deployed.



Karan Agrawal