Creating VPC

Let's look at steps to create a custom VPC in an AWS account. This VPC will be created using IPv4 Classless Inter-Domain Routing (CIDR) block. It will have one public subnet and one public facing instance in this subnet. It will also have one private subnet and one instance in private subnet. For instance, for a private subnet to access the internet, we will use a NAT gateway in a public subnet. This VPC will have security groups and network ACL configured to allow egress and ingress internet traffic along with routes configured to support this scenario:

  1. Create a VPC with a /16 IPv4 CIDR block such as 10.0.0.0/16.
  2. Create an internet gateway and attach it to this VPC.
  3. Create one subnet with /24 IPv4 CIDR block, such as 10.0.0.0/24, and ...

Get AWS: Security Best Practices on AWS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.