GithubHelp home page GithubHelp logo

emadd9 / aws-ec2-static-web-hosting Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 148 KB

Mini-Project : Hosting a static website on AWS

Shell 100.00%
application-load-balancer aws ec2 github httpd-server internet-gateway nacl nat-gateway route53 ssl-certificate

aws-ec2-static-web-hosting's Introduction

Mini-Project : Hosting a static website on AWS

This demo project is describing an architecture for hosting a website on AWS (Amazon Web Services). The architecture is designed to provide high availability, fault tolerance, and scalability. Here's a summary of the architecture:

Resources used in this project:

Virtual Private Cloud (VPC)
  • Public and Private Subnets: Isolates resources for added security. Public subnets have a route to the Internet Gateway, while private subnets don't.
  • Route Tables: Control traffic between subnets and the internet.
  • Internet Gateway (IGW): Enables communication between instances in the VPC and the internet.
  • Network Address Translation (NAT) Gateway: Allows instances in private subnets to access the internet while maintaining privacy.
Route 53
  • Public and Private Hosted Zones: Manage DNS records for public and internal domains.
  • Simple Routing Policies: Direct traffic to resources using simple rules like weighted or round-robin routing.

Application Load Balancer (ALB)

  • Target Groups: Directs traffic to a group of instances based on rules or conditions.
  • Host Header Routing: Routes traffic to different target groups based on the host header value in HTTP requests.

EC2 Instances

  • Security Groups: Control inbound and outbound traffic to instances.
  • Network Access Control Lists (NACLs): Provides an additional layer of network security at the subnet level.

Bastion Host

  • Acts as a secure gateway to access instances in the private subnet when required.

Auto Scaling Group (ASG)

  • Dynamically adjusts the number of EC2 instances based on traffic demand, ensuring scalability and fault tolerance.

These fundamental AWS resources work together to create a highly available, scalable, and secure web hosting environment. With automatic scaling and redundancy across multiple Availability Zones, the architecture ensures optimal performance and reliable operation for hosting the website on AWS.

Project Architecture:

Project Diagram

What I did:

  1. Virtual Private Cloud (VPC): The VPC is set up with both public and private subnets distributed across two Availability Zones (AZs) for redundancy and high availability.

  2. Internet Gateway: An Internet Gateway is attached to the VPC, allowing communication between instances within the VPC and the internet.

  3. High Availability: Two Availability Zones are used to ensure that the application remains available even if one AZ experiences an outage.

  4. Public Subnets: Resources such as the NAT Gateway, Bastion Host, and Load Balancer are placed in the public subnets to be accessible from the internet.

  5. Private Subnets: The web servers are deployed in the private subnets to isolate them from direct internet access, enhancing security.

  6. NAT Gateway: The NAT Gateway allows instances in the private subnets to access the internet for software updates, etc., while maintaining security.

  7. EC2 Instances: The website is hosted on EC2 instances in the private subnets, providing a flexible and customizable hosting environment.

  8. Application Load Balancer (ALB): The ALB is utilized to distribute incoming traffic among instances deployed across multiple Availability Zones, enhancing load distribution and fault tolerance.

  9. Auto Scaling Group: The website's EC2 instances are managed by an Auto Scaling Group, which automatically adjusts the number of instances based on traffic and demand. This ensures the application is both scalable and fault-tolerant.

  10. Route 53: The domain name for the website is registered with Route 53, which allows easy management and mapping of domain names to AWS resources.

  11. GitHub Repository: Web files are stored in a GitHub repository, enabling version control, collaboration.

Overall, this architecture combines several AWS services to create a robust, scalable, and fault-tolerant web hosting environment, ensuring the website remains available and performs well under varying loads.

aws-ec2-static-web-hosting's People

Contributors

emadd9 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.