High Availability Unleashed:

Deploying Static Websites with AWS Auto Scaling, SNS, ELB, and Route 53

Table of contents

Introduction

Welcome to our college project – "High Availability Unleashed: Deploying Static Websites with AWS Auto Scaling, SNS, ALB, and Route 53." Imagine it as our tech adventure where we're making static websites super tough and reliable using Amazon Web Services (AWS).

In simple terms, we're learning to use AWS tools like Auto Scaling, SNS, ALB, and Route 53 to make sure websites stay up and running, no matter what.

AWS Services Requirement

  1. EC2 for scalable computing

  2. AMI for rapid instance provisioning.

  3. VPC for secure networking

  4. Security Groups for Robust Protection

  5. Route 53 for reliable DNS

  6. ACM for HTTPS security

  7. Auto Scaling Group for dynamic resource management

  8. ALB for high availability

  9. SNS for timely notifications

What we’ll be doing

  • Network Environment Setup:

    • Establish Virtual Private Cloud (VPC)

    • Define subnets for strategic segmentation

    • Integrate an Internet Gateway

    • Configure route tables for efficient traffic management

    • Create security Groups

  • Website Deployment and Auto Scaling Template:

    • Deploy website on Amazon EC2 instance

    • Create Amazon Machine Image (AMI) for Auto Scaling template

  • Application Load Balancer (ALB) and Auto-Scaling Group:

    • Implement ALB for intelligent traffic routing

    • Distribute traffic across multiple subnets for enhanced fault tolerance

  • Domain Resolution with Route 53:

    • Utilize Route 53 for DNS resolution

    • Translate hostnames to IP addresses for seamless accessibility

  • HTTPS Security with ACM:

    • Integrate AWS Certificate Manager (ACM) for HTTPS

    • Strengthen website security and instill user trust.

Step 1: Create our environment

1. Create a VPC:

A VPC is an isolated portion of the AWS Cloud populated by AWS objects, such as Amazon EC2 instances.

2. Set Up Public Subnets:

  • Make two (2) public sub-areas where our EC2 instances will be kept.

subnet 2 of 2

3. Add an Internet Gateway

Include a gateway to connect our sub-areas to the internet.

4.Route Table

1.Create security group

A security group acts as a virtual firewall for your instance to control inbound and outbound traffic. To create a new security group, complete the fields below.

Step 2: Deploy EC2 and create AMI

#!/bin/bash
sudo su -
yum install httpd -y
systemctl enable --now httpd
cd /var/www/html
echo '<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Cloud Engineer Portfolio</title>
  <style>
    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      margin: 0;
      padding: 0;
      background-color: #f5f5f5;
      color: #333;
      line-height: 1.6;
    }

    header {
      background-color: #3498db;
      color: #ecf0f1;
      padding: 30px 0;
      text-align: center;
    }

    nav {
      background-color: #2c3e50;
      padding: 15px;
      text-align: center;
    }

    nav a {
      color: #ecf0f1;
      text-decoration: none;
      padding: 15px;
      margin: 0 15px;
      font-weight: bold;
      transition: color 0.3s;
    }

    nav a:hover {
      color: #3498db;
    }

    section {
      background-color: #fff;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      padding: 30px;
      margin: 20px auto;
      max-width: 800px;
    }

    section h2 {
      color: #3498db;
    }

    section p {
      margin-bottom: 15px;
    }

    section ul {
      list-style-type: none;
      padding: 0;
      margin: 0;
    }

    section li {
      margin-bottom: 10px;
    }

    footer {
      background-color: #3498db;
      color: #ecf0f1;
      padding: 20px 0;
      text-align: center;
    }

    footer p {
      margin: 0;
    }
  </style>
</head>
<body>

  <header>
    <h1 style="margin-bottom: 0; font-size: 2em;">Portfolio-Cloud-Skills</h1>
  </header>

  <nav>
    <a href="#">Home</a>
    <a href="#">About</a>
    <a href="#">Skills</a>
    <a href="#">Projects</a>
    <a href="#">Contact</a>
  </nav>

  <section>
    <h2>About Me</h2>
    <p>Welcome to my personal portfolio! I am a passionate and skilled Cloud Engineer with a strong background in designing, implementing, and managing cloud infrastructure.</p>
    <p>With a keen interest in cloud technologies and a commitment to staying updated with the latest advancements, I bring a blend of technical expertise and problem-solving skills to the table.</p>
  </section>

  <section>
    <h2>Skills</h2>
    <p>Here are some of my key skills as a Cloud Engineer:</p>
    <ul>
      <li><strong>Infrastructure as Code (IaC)</strong> using Terraform</li>
      <li><strong>Cloud Platforms:Cloud Platforms:</strong> AWS, Azure, Google Cloud</li>
      <li><strong>Containerization</strong> with Docker and Kubernetes</li>
      <li><strong>Continuous Integration/Continuous Deployment (CI/CD)</strong></li>
      <li><strong>Scripting Languages:</strong> Python, Bash</li>
      <li><strong>Monitoring and Logging:</strong> Prometheus, Grafana, ELK Stack</li>
    </ul>
  </section>

  <section>
    <h2>Projects</h2>
    <p>Explore some of the projects I've worked on:</p>
    <ul>
      <li><strong>Project 1:</strong> Implemented an automated deployment pipeline for a microservices architecture using Jenkins and Kubernetes.</li>
      <li><strong>Project 2:</strong> Designed and managed a highly available infrastructure on AWS for a web application with auto-scaling and load balancing.</li>
      <li><strong>Project 3:</strong> Created Terraform scripts for provisioning and managing infrastructure resources, improving efficiency and scalability.</li>
      <!-- Additional dummy projects -->
      <li><strong>Project 4:</strong> Implemented a serverless architecture for real-time data processing using AWS Lambda and Kinesis.</li>
      <li><strong>Project 5:</strong> Deployed a multi-region Kubernetes cluster for a global e-commerce platform to ensure high availability and low latency.</li>
    </ul>
  </section>

  <section>
    <h2>Contact Me</h2>
    <p>Feel free to reach out if you have any questions or if you would like to collaborate:</p>
    <ul>
      <li><strong>Email:</strong> cloudengineer@example.com</li>
      <li><strong>LinkedIn:</strong> linkedin.com/in/cloudengineer</li>
    </ul>
    <p>Alternatively, you can use the form below to send me a message:</p>
    <!-- Add a contact form here if desired -->
  </section>


  <footer>
    <p>&copy; 2023 Your Name - Cloud Engineer. All rights reserved.</p>
  </footer>

</body>
</html>
' > index.html

Now Delete Old Instance

Now Create Instance Through AMI

Now Launch two EC2 instances using the Same AMI (webimage) one in sub1 and second in sub2.

Step 3 : Setup ALB and Auto-Scaling Group

Choose Application Load balancer

Step 4: Setting Route 53

Now Go to your Domain and change Nameservers

Create Record

Now Check yashwantsingh.xyz

Now Issue Certificate manager

Select Load Balancer

Step 5: Add Auto-Scaling Group

DONE