Create High Availability Architecture with AWS CLI

Create High Availability Architecture with AWS CLI

ARTH - Task 6 👨🏻‍💻

🔅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.


The EC2 instance was configured as the webserver . Webserver used is Apache httpd.

To install httpd on webserver use :

yum install httpd

After mounting EBS block we create a S3 bucket.An Amazon S3 bucket is a public cloud storage resource available in Amazon Web Services' (AWS) Simple Storage Service (S3), an object storage offering. Amazon S3 buckets, which are similar to file folders, store objects, which consist of data and its descriptive metadata.

For creating S3 bucket :

No alt text provided for this image

But we get error on this command because of unspecified location constraint. This error happens because regions outside of us-east-1 require the appropriate LocationConstraint to be specified in order to create the bucket in the desired region.

So we run this command:

No alt text provided for this image

We can see our bucket created in the AWS WebuI.

No alt text provided for this image


Uploading a file to the S3 bucket , we run the following command

No alt text provided for this image

Similarly we can see the file uploaded in our bucket on the AWS web ui.

No alt text provided for this image

For reducing latency and increasing security for delivery of data , we use CDN provided by Amazon Cloudfront.

A content delivery network, or content distribution network, is a geographically distributed network of proxy servers and their data centers. The goal is to provide high availability and performance by distributing the service spatially relative to end users.

For creating distribution run -

No alt text provided for this image
No alt text provided for this image

At last we can view various stats , such as cache statistics and cloud front viewers

No alt text provided for this image
No alt text provided for this image

Updating our code to use CloudFront service:

No alt text provided for this image


To view or add a comment, sign in

More articles by Yash Indane

  • Use of K-mean clustering in security domain

    Summer Task-10 & ARTH Task 42 Github -> What is K-means Clustering? K-means clustering is one of the simplest and…

  • OSPF Routing Protocol using Dijkastra Algorithm

    What is OSPF? The OSPF (Open Shortest Path First) protocol is one of a family of IP Routing protocols, and is an…

  • Using Face Recognition for automation

    SUMMER-TASK-6 (Team Task) and ARTH TASK 38 GitHub -> In this article I will explain how we can use Face Recognition and…

    3 Comments
  • JavaScript use cases in Industry

    Summer Task 7.2 What is JavaScript? JavaScript, often abbreviated as JS, is a programming language that conforms to the…

    1 Comment
  • Use of confusion matrix in detecting cyber crime

    Summer 2021 Task 05 👨🏻💻 Particularly in the last decade, Internet usage has been growing rapidly. However, as the…

  • Running Chrome in Docker container

    Summer - Task 02 👨🏻💻 By default containers don't support GUI, but by some way we can achieve that, let's discuss…

    3 Comments
  • Training a ML model inside a container

    Task 01 👨🏻💻 Task Description 📄 👉 Pull the Docker container image of CentOS image from DockerHub and create a new…

    4 Comments
  • Deploying WordPress in Amazon EKS with RDS in Backend

    ARTH-TASK-23 WordPress is a free and open-source content management system written in PHP and paired with a MySQL or…

    3 Comments
  • How industry uses MongoDB

    ARTH-TASK-32 What is MongoDB? MongoDB is a source-available cross-platform document-oriented database program…

  • Creating a Multicloud Setup of Kubernetes using Ansible Roles

    TASK 28 Task Description 📄 📌 CREATE A MULTI-CLOUD SETUP of K8S cluster: 🔅 Lunch node in AWS 🔅 Lunch node in Azure…

    2 Comments

Others also viewed

Explore content categories