Create High Availability Architecture with AWS CLI

Lakshmi Priya Patro
4 min readMar 18, 2021

--

Task Description
🔰 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.

AWS

Amazon Web Services (AWS) is the world’s most comprehensive and broadly adopted cloud platform. Millions of customers — including the growing startups, largest enterprises, and leading government agencies are using AWS to lower their infrastructure costs, become more agile, and innovate faster.

AWS CLI

The AWS Command Line Interface (CLI) is a unified tool to manage your AWS services. With just one tool to download and configure, we can control multiple AWS services from the command line and automate them through scripts.

AWS EC2

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. It provides you with complete control of your computing resources and lets you run on Amazon’s proven computing environment.

AWS EBS

Amazon Elastic Block Store (EBS) is an easy to use, high-performance, block-storage service designed for use with Amazon Elastic Compute Cloud (EC2) for both throughput and transaction intensive workloads at any scale.

AWS CloudFront

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

Apache Webserver

Apache HTTP Server is a free and open-source web server that delivers web content through the internet.

Let’s start with the practical:-

Step-1: First login to aws using command line. To login ,we use Access and Secret key provided by IAM AWS service

Step-2:- Create key Pairs and attach to the instance for login

Step-3: Create Security Group /Firewall for attaching to the instance

Step-4: Run/Launch the instance and attach the keypair

Step-5: Create an EBS volume and attach to the instance.

Step-6: Login remotely to the instance and configure webserver

Step-7:- Create partition and format it.

Step-8: Mount the Drive/Partition with the Mount Point(/var/www/html).

Step-9: Create S3 bucket and make the bucket public and upload a image in s3 bucket in make it also public for public access.

Step-10: Create CloudFront and attach with the s3 bucket to access the all content of bucket using Content Delivery Network (CDN) using there url.

Step-11: Start the webserver using this cmd.

systemctl start httpd

Step-12: Now we can access the web page using the Public IP of Instance via browser.

Hence we successfully uploaded an image on the webserver.

Thank you!!

--

--