DEV Community

Brundha Rajendran
Brundha Rajendran

Posted on

AWS-THREE TIER ARCHITECTURE

Three-tier architecture is a software design pattern that organizes an application into three separate layers or tiers. Each tier has a specific role, making the application easier to manage, scale, and develop.

Image description
Extract code:

Image description

Create s3 bucket

Image description

Image description

Create Role to integrate 2 services for Authentication

Image description

Steps to create three tier architecture

  1. VPC creation
  2. Subnet creation
  3. Network connectivity
  4. NAT Gateway
  5. Routing configuration
  6. Security Groups

Working:

1.VPC Creation

  • VPC only is selected, and fill out the VPC Settings with a Name tag and a CIDR range of your choice.

Image description

2.Subnet creation

Need 6 subnets for two availability zones.

az1(zone 1)

  • public subnet1
  • private subnet1
  • private database subnet

az2(zone 2)

  • public subnet2
  • private subnet2
  • private database subnet

Image description

Image description

3.Internet Connectivity

  • Create Internet Gateway(IG)

Image description

  • allocate Internet Gateway to VPC

Image description

*4.Create NAT Gateway *

  • NAT Gateway created to connect private subnet with internet.
  • Create 2 NAT Gateways-The architecture has 2 zones.
  • Before creating NAT Gateway we need to allocate elastic IP in Elastic IPS.

Image description

Image description

  • Follow the same steps for az2(zone 2)

5.Routing configuration

  • Improves communication, enforces security, and supports scalability by managing how data flows between layers efficiently.
  • Create route table for both public and private subnets

Image description

update subnet association for public and private subnets

Image description

Image description

6.Security groups

  • used to control traffic flow between the layers.
  • need to create 5 security groups.
  1. public-internet facing load balancer
  2. public instances in the web tier
  3. load balancer
  4. private instances
  5. private database instances

** internet facing load balancer**

Image description

web tier

Image description

load balancer

Image description

private instances

Image description

** private database instances**

Image description

Creating Subnet groups

Image description

  • Database created!!

Image description

Image description

App Instance Deployment

Image description

Image description

Image description

Heroku

Deploy with ease. Manage efficiently. Scale faster.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

AWS Q Developer image

Your AI Code Assistant

Generate and update README files, create data-flow diagrams, and keep your project fully documented. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

👋 Kindness is contagious

If you found this post useful, please drop a ❤️ or leave a kind comment!

Okay