DEV Community

S.B.Shanjaiy
S.B.Shanjaiy

Posted on

Three Tier Architecture Part-3 Vpc and Subnet

Welcome to Part-3 of Three tier Architecture.
First create a Vpc and give 10.0.0.0/16 in ipv4 and create the Vpc
Image description

Image description

Next create 4 private subnet and 2 public subnet for the aws-3-tier-workshop and create tag if needed as shown below

Image description
Image description
Image description
Image description
Image description
Image description

Now we have completed creating all 6 subnets

Image description

Next we have to create internet gateway as shown below

Image description

Next we are going to attach the Internet gateway to the vpv as shown below:
Image description

Lets now create a NAT gateway for both public subnets

Image description
Image description
Image description

Next we have to craete route table

Image description

Next we have to edit the route table by adding the internet gateway and save it as below

Image description

Image description

Now on subnet asssciation and add the 2 public subnet and save it:

Image description

Next we have to create 2 route table for 2 nat gateways

Image description

Now edit the route table and add the both nat gateway 1 and 2 for both the route table

Image description
Image description

Next in subnet association connect the first private subnet to first route table and the 2nd private subnet to the second route table

Image description

Image description

next we have to create 5 Security groups,first lets create security group for internet facing lb ,edit onlt the outbound rules

Image description

next lets create security group for web tier , edit only the inbound rules

Image description

Image description

Next create security group for internal load balancer and in inbound rules connect the security group of web tier

Image description

Next we have to create 4th security group for the app-tier we have to connect the security group of internal load balancer and in custom tcp we have to give port 4000

Image description

Next lets create the 5th security group connect to the db and the internal load balancer

Image description

Now we have completed the Part-3 of 3-Tier Architecture, See you in Part-4

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay