Skip to content

Create a VPC to deploy the Identity API

Aditya Abeysinghe edited this page Mar 4, 2024 · 5 revisions

A VPC needs to be created before installing the SQL Server on RDS and deploying the Web API to AWS.

Within the VPC, an internet gateway and a NAT gateway needs to be created. The following are the steps to create a VPC.

  1. Create a VPC with the following:
    • Resources to create - VPC only
    • Name - (Enter a name)
    • IPv4 CIDR block - IPv4 CIDR manual input and for the input type 10.0.0.0/16
    • IPv6 CIDR block - No IPv6 CIDR block
    • Tenancy - Default
    • Tags - (Nothing to change)
  2. After the VPC is created, click Edit VPC settings in the Actions dropdown and choose Enable DNS hostnames and click Save changes
  3. Next create a public subnet and a private subnet with the following details and Click Create subnet:
    • VPC ID - (ID of the VPC in step 1)
    • Public subnet -
      • Subnet name - (Enter a name)
      • Availability Zone - (select an AZ)
      • IPv4 CIDR block - 10.0.0.0/16
      • IPv4 Subnet CIDR block - 10.0.32.0/20
    • Private subnet -
      • Subnet name - (Enter a name)
      • Availability Zone - (select the same AZ)
      • IPv4 CIDR block - 10.0.0.0/16
      • IPv4 Subnet CIDR block - 10.0.64.0/20
  4. Next within the VPC, create an internet gateway with the following:
    • Name tag - (Enter a name)
  5. Attach the internet gateway to the VPC that was created by clicking Actions -> Attach to VPC and choosing the name of the VPC
  6. Within the VPC, create a NAT gateway with the following:
    • Name - (Enter a name)
    • Subnet - (Choose the public subnet created)
    • Connectivity type - Public
    • Elastic IP allocation ID - Click Allocate Elastic IP
  7. Within the VPC, configure the route table to be private
    • Click the edit icon and enter a name.
    • Click Edit routes in the Routes tab.
    • Click Add route and enter the following details and save the change:
      • Destination - 0.0.0.0/0
      • Target - Select NAT Gateway and then select the NAT gateway created above
  8. Within the VPC, create a new route table for the public subnet with the following:
    • Name - (Enter a name)
    • VPC - (ID of the VPC in step 1)
  9. For the table created, click Edit routes in the Routes tab. Next click Add route and enter the following details and save the change:
    • Destination - 0.0.0.0/0
    • Target - Select Internet Gateway and then select the Internet gateway created above
  10. Click Subnet Associations tab and Edit subnet associations in table created and select the public subnet and click Save Associations
Clone this wiki locally