Go to VPC Dashboard and use the Launch VPC Dashboard

Create (Allocate) an elastic IP address and keep it handy. Select the option VPC with Public and Private Subnets

Configure the subnet CIDRs and associate the elastic IP created in the previous step in the form. This will create a NAT Gateway and set it up automatically with correct route tables.
Things to note:
- NAT Gateway should always be in the public subnet.
- Route table of Private Subnet should have a route
0.0.0.0/0
to NAT Gateway
- Route table of Public Subnet should have a route
0.0.0.0/0
to Internet Gateway
- Lambda function should be configured with the Private Subnet and not the Public Subnet
- Security Group configured in the lambda function should allow outbound to
0.0.0.0/0
(which is there by default, but you should verify)