Creating a bare VPC and setting up public and private subnets
A public subnet is specifically designed to enable instances within it to be accessible from the internet. This is achieved by routing the internet traffic through an IGW by configuring route tables. In the Setting up VPC plus VPC resources with minimal effort recipe from this chapter, we selected the VPC and more option while creating the VPC as we saw in Figure 5.1, which automatically set up public and private subnets, along with a pre-configured IGW and route tables. For this recipe, we will choose the VPC only option to create a VPC without the additional networking resources and set up an IGW and a route table to enable internet access to the instances in our subnet.
Getting ready
To follow this recipe, we need a working awsseccb-sandbox-1AWS account, and a awsseccbadmin1 user, as described in the Technical requirements section.
How to do it...
First, we will create a bare VPC and a subnet, and then we...