Amazon Web Services
intermediate
Build a custom VPC with public and private subnets
Design a two-tier network from scratch: VPC, subnets in two Availability Zones, an internet gateway, a public route table and a web-tier security group – then prove it works by launching an instance into it.
What you'll do
- Plan CIDR blocks for a VPC and its subnets
- Make a subnet public with an IGW and route table
- Keep a private subnet isolated
- Apply security group rules
- Launch and reach an instance in your own VPC
Lab tasks
-
1
Create VPC
lab-vpc(10.0.0.0/16) -
2
Enable DNS hostnames on
lab-vpc -
3
Create
public-subnet-1a(10.0.1.0/24) -
4
Create
private-subnet-1b(10.0.2.0/24) -
5
Create internet gateway
lab-igw -
6
Attach
lab-igwtolab-vpc -
7
Create route table
public-rt - 8 Add a default route to the internet gateway
-
9
Associate
public-rtwith the public subnet - 10 Enable auto-assign public IPv4 on the public subnet
-
11
Create security group
web-sg -
12
Launch
web-01into the public subnet -
13
Prove internet reachability from
web-01