Created high availability architecture using AWS CLI

Shivani Mandloi
3 min readOct 31, 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.

Lets start….

  1. Creating bucket in AWS S3 service through CLI.

Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance

Why S3 here ? because I am using S3 bucket as my origin . means whenever client opens my webapp the image in my web app would have My S3 bucket as a origin.

2.So, uploaded an Image I want to load on the web page using command as follows.

3. Now if the user is from other country they experience latency which indirectly made them feel we are not giving better service so, Amazon has a service called Amazon Cloud Front which is a fast content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to customers globally with low latency, high transfer speeds, all within a developer-friendly environment .

here, I set up Content Delivery Network using Cloud Front and using the origin domain as my S3 bucket using command as follows

3. Started my instance using cli using commands

4. Configuring web serves: Step1-

5. Created Volume

6.Attaching volume to the instance, creating partition and mounting it. to make Document Root(/var/www/html) persistent .

7.Created a simple webApp

And this is how you can solve your latency problem and security.

--

--

No responses yet