Create a public and private subnet. Create two instances (one in each subnet) and the instance in private subnet should get internet. Instance in private subnet should allow traffic only from public subnet.
Create a VPC: Go to the AWS Management Console and navigate to the VPC dashboard. Click on "Create VPC" and enter the required details, such as the VPC name, CIDR block, etc. Create Subnets: Navigate to the "Subnets" section of the VPC dashboard. Click on "Create subnet" and enter the required details, such as the subnet name, VPC ID, CIDR block, availability zone, etc. Create two subnets, one for public and one for private. Create Internet Gateway: Navigate to the "Internet Gateways" section of the VPC dashboard. Click on "Create internet gateway" and enter the required details, such as the internet gateway name. Attach the internet gateway to the VPC. Route Tables: Navigate to the "Route Tables" section of the VPC dashboard. Create two route tables, one for each subnet. Associate the public subnet with the default route table. Associate the private subnet with the new route table. Create Security Groups: Navigate to the ...