Step 5: Nat Gateway - (Mandatory for deploy instance type)

This step is optional for all instances except the deploy instance (This requires egress access to the internet to permit outbound traffic containing billing information.)

Under the VPC page, select the NAT gateway option on the left menu bar.

Click the "Create NAT Gateway button"

Under subnet, Select "panintelligence-public-a"

Click the Allocate Elastic IP Address. This option will automatically create an elastic IP address and attach it to this new NAT Gateway.

Add the tag Name : panintelligence_nat_gateway

Open the route table page by clicking the Route tables on the menu tab on the left.

Highlight the private subnet and click the routes tab.

Click the edit routes button followed by the add routes button to the subsequent screen.

Add our new NAT Gateway to the routes.

In the VPC menu, click the Network ACLs on the menu on the left once more. Select the public subnet and under the inbound rules tab, add the route to permit inbound traffic from anywhere on all ports.

Now we need to create an additional policy to allow our instance to communicate with the metering API and to allow it to ascertain whether it belongs to an autoscaling group.

Now We attach this to our panintelligenceBackup Role so our EC2 instance inherits all the necessary permissions to configure itself.