Creating A High Availability Architecture with AWS CLI | EC2 | Cloudfront | EBS | S3

Jaindivya
3 min readMar 20, 2021

--

This Architecture includes:

- Webserver configured on EC2 Instance

- /var/www/html made persistent by mounting on EBS Block Device.

- S3 is used for storing static objects such as pictures

- Setting up CDN using CloudFront and using the origin domain as S3 bucket.

  • For security and low latency placed the Cloud Front URL on the webapp code

STEP 1>>Download and configure AWS CLI in local machine.

Step 2>>To configure Aws CLi and continue the services,we need to create a IAM user

‘user’ is my IAM user,which I used for configuration

Step 3>>Next step is to use aws configure command in cli to configure aws in cli mode,We will require access id and secret key for this

Step 4>> Launch EC2 Instance.

The first step in launching Ec2 instance is to create a key-pair

To verify:::

Step 5>>Creating Security Group

To verify::

Step 6>>Add ingress rule to allow ssh

Step 7>>Now,for launching ec2 instance we will use the following command

To verify::

Step 8>>Now by creating an S3 bucket and store some static objects.

Step 9>>Now we will upload some objects in it..

Step 10>>Next We will create our CloudFront distribution::

To verify::

Step 11>>Next step is the create a volume

Step 12>>Next we will attach the volume to the ec2 instance:

So,Let’s go to AWS ec2 instance and configure the volume…

So,firstly we will create a partition and mount it in the folder /var/www/html

We created some webpages and assigned the location of s3 object inside it….

Voilaa! We are doneeee!!

— Divya Jain

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response