AWS Day 7: AWS VPC Project for 2 tier app in private subnet

AWS Day 7: AWS VPC Project for 2 tier app in private subnet

Creating a Virtual Private Cloud (VPC) with a two-tier application architecture in private subnets involves several steps. In this scenario, we'll create a simple VPC with a public subnet, a private subnet, and an EC2 instance in each subnet. The public subnet will host a load balancer, and the private subnet will host an application server. Here's a step-by-step guide:

  1. Create a VPC.

    Preview of your VPC.

    Now The VPC is CREATED.

  2. Now Create an Auto-scaling group:

    Firstly we have to create a Launch Template:
    Mention your template name add AMI to templates and Check on Create security group add your created VPC.

    Now Select the recently created template for the auto-scaling group.

    Now we need to choose the VPC that we created earlier.

    Configure group size and scaling policies:

    Now auto-scaling group is created.

    Now Check whether your instance is running or not.

    Now Launch a new instance called bastion-host where you need to add your existing VPC which you created earlier.

    Copy the key to the Bastion host from your local machine by using the SCP (secure copy) Command.
    scp -i "exam.pem" exam.pem ubuntu@52.55.14.45:/home/ubuntu

    Now ssh to the server with your private IP Address:

    Now create an index.html file and install python3.

  3. Now let's create a Load balancer.

    Now Create a target group:

    Select Target group:

    Now load balancer is created and check the DNS name with your browser:

This setup demonstrates a basic two-tier application architecture in a VPC, with a public subnet for the load balancer and a private subnet for the application server. It's important to note that this is a simplified example, and in a real-world scenario, you would need to consider security groups, network ACLs, and other factors for a production-ready deployment.

🔶 Learning Resources:

Throughout my AWS journey, I've found valuable learning materials to enhance my understanding. One such resource that has been incredibly helpful is the YouTube playlist titled 'AWS Zero to Hero'

As I continue sharing my AWS experiences in this blog series, I encourage you to explore this playlist and stay curious about the ever-evolving world of AWS.

#AWS_Zero_to_Hero Repo: https://github.com/Chandreshpatle28/aws-devops-zero-to-hero.git


Happy Learning!

Stay in the loop with my latest insights and articles on cloud ☁️ and DevOps ♾️ by following me on Hashnode, LinkedIn (https://www.linkedin.com/in/chandreshpatle28/), and GitHub (https://github.com/Chandreshpatle28).

Thank you for reading! Your support means the world to me. Let's keep learning, growing, and making a positive impact in the tech world together.

#Git #Linux Devops #Devopscommunity #90daysofdevopschallenge #python #docker #Jenkins #Kubernetes #Terraform #AWS

Did you find this article valuable?

Support Chandresh Patle's Blog by becoming a sponsor. Any amount is appreciated!