Code Monkey home page Code Monkey logo

aws-production-environment-project's Introduction

AWS-Production-Environment-Project

The following diagram provides an overview of the resources included in this example. I created a VPC with public subnets, private subnets, and a bastion server in multiple Availability Zones. Each public subnet contains a NAT gateway and a load balancer node. The servers run in the private subnets, are launched and terminated by using an Auto Scaling group, and receive traffic from the load balancer. The servers can connect to the internet by using the NAT gateway. The servers can connect to Amazon S3 by using a gateway VPC endpoint. The bastion server provides secure access to the instances in the private subnets. 1699781752576

VPC Structure

  • Public Subnets: Contain NAT gateway, load balancer node, and bastion server.
  • Private Subnets: Contain servers launched by an Auto Scaling group.
  • Connectivity:
    • Servers to Internet: Through NAT gateway.
    • Servers to Amazon S3: Through gateway VPC endpoint.
    • Secure Access: Through bastion server.

Routing

When I created this VPC using the Amazon VPC console, a route table was created for the public subnets with local routes and routes to the internet gateway. Additionally, a route table was created for the private subnets with local routes, routes to the NAT gateway, egress-only internet gateway, and gateway VPC endpoint.

Public Subnet Route Table Example

Destination Target
10.0.0.0/16 local
2001:db8:1234:1a00::/56 local
0.0.0.0/0 igw-id
::/0 igw-id

Private Subnet Route Table Example

Destination Target
10.0.0.0/16 local
2001:db8:1234:1a00::/56 local
0.0.0.0/0 nat-gateway-id
::/0 eigw-id
s3-prefix-list-id s3-gateway-id

Security

Example security group rules for servers and bastion server:

Inbound Rules for Servers

Source Protocol Port Range Comments
ID of the load balancer security group listener protocol listener port Allows inbound traffic from the load balancer on the listener port
ID of the load balancer security group health check protocol health check port Allows inbound health check traffic from the load balancer

Inbound Rules for Bastion Server

Source Protocol Port Range Comments
Your IP (CIDR) SSH 22 Allows SSH access from your IP address
Private Subnet CIDR SSH 22 Allows SSH access to instances in private subnets

Create the VPC

Steps to Create the VPC

  1. I opened the Amazon VPC console at https://console.aws.amazon.com/vpc/.
  2. On the dashboard, I chose Create VPC.
  3. For Resources to create, I chose VPC and more.

Configure the VPC

  1. For Name tag auto-generation, I entered a name for the VPC.
  2. For IPv4 CIDR block, I kept the default suggestion or entered the required CIDR block.
  3. If using IPv6, I chose IPv6 CIDR block, Amazon-provided IPv6 CIDR block.

Configure the Subnets

  1. For Number of Availability Zones, I chose 2 or more to improve resiliency.
  2. For Number of public subnets, I chose 2 or more.
  3. For Number of private subnets, I chose 2 or more.
  4. For NAT gateways, I chose 1 per AZ.

DNS Options

  • I cleared Enable DNS hostnames.

Create the VPC

  • I chose Create VPC. 1699781750890

Deploy Your Application

  • I used Amazon EC2 Auto Scaling to deploy servers in multiple Availability Zones.

Launch Instances Using Auto Scaling

  1. I created a launch template to specify the EC2 instances configuration.
  2. I created an Auto Scaling group.
  3. I created a load balancer and attached it to the Auto Scaling group. 1699781750967

Bastion Server Deployment

  1. I launched an EC2 instance to act as the bastion server in one of the public subnets.
  2. I ensured the bastion server had a security group that allows SSH access from my IP and access to the private subnet instances.

Simple Python Page Deployment

I launched a simple Python page on the servers deployed in the private subnets.

1699781750804

aws-production-environment-project's People

Contributors

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