Create High Availability Architecture with AWS CLI

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.

Step 1:

Create an IAM user to access AWS CLI. Then use the following command to access the AWS service through CLI,

No alt text provided for this image

Then create a key pair & security group to launch an instance

key pair is a set of security credentials that you use to prove your identity when connecting to an instance.

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

A security group acts as a virtual firewall for your EC2 instances to control incoming and outgoing traffic. 

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

Launching an instance using above create key pair and security group

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

Step 2:

Create an EBS volume

It is an block-level storage device that you can attach to your instances. After you attach a volume to an instance, you can use it as you would use a physical hard drive. EBS volumes are flexible.

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

Attach an EBS volume to the launched instance,

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

Step 3:

Install Apache Server On The Instance

No alt text provided for this image

Step 4:

Create a Partition on the attached EBS volume:

No alt text provided for this image

Format & Mount the Partition:

No alt text provided for this image

Step 5:

Create a S3 Bucket,

S3 is the only object storage service that allows you to block public access to all of your objects at the bucket or the account level with S3 Block Public Access.

No alt text provided for this image

Upload your picture to the S3 Bucket

No alt text provided for this image

Step 6:

Create a Cloud Front Distribution:

CloudFront 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

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

Step 7:

Go to the path /var/www/html in your instance and create an .html file and add the cloud front URL in your script

No alt text provided for this image

Now lets take a look at our Web page

No alt text provided for this image



To view or add a comment, sign in

More articles by Abhishek Singh

  • What is Jenkins? - How does Jenkins work? & Advantages

    What is Jenkins? Jenkins is an open-source Continuous Integration server written in Java for orchestrating a chain of…

    1 Comment
  • AWS SQS – Benefits, Queue & Function

    What is AWS SQS Amazon Simple Queue Service (SQS) is a fully managed message queuing service that enables you to…

  • Use Cases of Azure Kubernetes Service

    Azure Kubernetes Service Benefits Azure Kubernetes Service is currently competing with both Amazon Elastic Kubernetes…

  • industry use cases of Neural Networks

    The idea of how neural networks work Recently there has been a great buzz around the words “neural network” in the…

  • Kubernetes Case Study - Airbnb

    What is Kubernetes? Kubernetes (also known as k8s or kube) is an open source container orchestration platform that…

  • How industries are solving challenges using Ansible

    What is Ansible? Ansible is an open-source automation tool, or platform, used for IT tasks such as configuration…

    1 Comment
  • Command Line Interface-ARTH

    Task Description📄 🔰 Create a Menu Using Python integrating all the concepts like AWS, HADOOP, DOCKER, HTTP…

    2 Comments
  • Artificial Intelligence and Machine Learning

    Artificial intelligence (AI) is wide-ranging branch of computer science concerned with building smart machines capable…

    4 Comments
  • AWS CLI

    TASK :- Create a key pair Create a security group Launch an instance using the above created key pair and security…

    8 Comments
  • GAMETION

    Founded in 2010, Gametion is a game development company based in Mumbai, India. With a team of seven full-time…

Insights from the community

Others also viewed

Explore topics