Launch an instance on your Outpost
After your Outpost is installed and the compute and storage capacity is available for use, you can launch Amazon EC2 instances and create Amazon EBS volumes on your Outpost using an Outpost subnet.
You can also create snapshots of Amazon EBS volumes on your Outpost. For more information, see Local Amazon EBS snapshots on AWS Outposts in the Amazon EC2 User Guide for Linux Instances.
Prerequisite
You must have an Outpost installed at your site. For more information, see Create an Outpost and order Outpost capacity.
Tasks
Step 1: Create a subnet
You can add Outpost subnets to any VPC in the AWS Region for the Outpost. When you do so, the VPC also spans the Outpost. For more information, see AWS Outposts network components.
If you are launching an instance in an Outpost subnet that has been shared with you, skip to Step 2: Launch an instance on the Outpost. For more information about sharing subnets, see Sharing a subnet in the Amazon Virtual Private Cloud User Guide.
To create an outpost subnet
-
Open the AWS Outposts console at https://console.aws.amazon.com/outposts/
. -
On the navigation pane, choose Outposts.
-
Select the Outpost, and then choose Actions, Create subnet.
-
Select the VPC and specify an IP address range for the subnet.
-
Choose Create.
Step 2: Launch an instance on the Outpost
You can launch EC2 instances in the Outpost subnet that you created, or in an Outpost subnet that has been shared with you. Security groups control inbound and outbound traffic for instances in an Outpost subnet, just as they do for instances in an Availability Zone subnet. To connect to an EC2 instance in an Outpost subnet, you can specify a key pair when you launch the instance, just as you do for instances in an Availability Zone subnet.
Step 3: Allocate and associate an Elastic IP address with the instance
If you want to use a shared customer-owned pool, the pool must be shared before you start the configuration. For information about how to share a customer-owned IPv4 addresses, see Sharing Your Resources in the AWS RAM User Guide.
You can allocate an Elastic IP address and assign it to the instance as follows:
Step 4: Configure local connectivity
You must explicitly associate a VPC with the local gateway route table to provide connectivity between the VPC and your local network. When you create a route, you can specify IP addresses, internet gateways, local gateways, virtual private gateways, and peering connections as destinations.
To configure routing
-
Associate the VPC with the local gateway route table as follows:
-
On the navigation pane, choose Local gateway route tables.
-
Select the route table, and then choose Actions, Associate VPC.
-
For VPC, select the VPC to associate with the local gateway route table.
-
Choose Associate VPC.
-
-
For the instance in your Outpost subnets to communicate with the local network, you must add a route with the local gateway as the next hop target to your Outpost's VPC subnet route table.
-
Open the Amazon VPC console at https://console.aws.amazon.com/vpc/
. -
In the navigation pane, choose Route Tables.
-
Select the route table associated with the subnet, and then choose Actions, Edit routes.
-
Choose Add route.
-
For Destination, enter the CIDR for the local network.
-
For Target, select the ID of the local gateway.
-
Choose Create route.
-
Step 5: Test the connectivity
You can test connectivity by using the appropriate use cases, as follows:
-
Test the connectivity from your local network to the Outpost. From a computer in your local network, run the
ping
command to the Outpost instance's customer-owned IP address (that you created in Step 2: Launch an instance on the Outpost). In the following example, the COIP is 192.0.2.128.ping 192.0.2.128 Pinging 192.0.2.128 Reply from 192.0.2.128: bytes=32 time=<1ms TTL=128 Reply from 192.0.2.128: bytes=32 time=<1ms TTL=128 Reply from 192.0.2.128: bytes=32 time=<1ms TTL=128 Ping statistics for 192.0.2.128 Packets: Sent = 3, Received = 3, Lost = 0 (0% lost) Approximate round trip time in milliseconds Minimum = 0ms, Maximum = 0ms, Average = 0ms
-
Test the connectivity from an Outpost instance to your local network. Depending on your operating system, use ssh or rdp to connect to the private IP address of your Outpost instance. For information about connecting to a Linux instance, see Connect to your Linux instance in the Amazon EC2 User Guide for Linux Instances. For information about connecting to a Windows instance, see Connect to your Windows instance in the Amazon EC2 User Guide for Windows Instances.
After the Outpost instance is running, run the ping command to an IP address of a computer in your local network. In the following example, the IP address is 192.0.2.130.
ping 192.0.2.130 Pinging 192.0.2.130 Reply from 192.0.2.130: bytes=32 time=<1ms TTL=128 Reply from 192.0.2.130: bytes=32 time=<1ms TTL=128 Reply from 192.0.2.130: bytes=32 time=<1ms TTL=128 Ping statistics for 192.0.2.130 Packets: Sent = 3, Received = 3, Lost = 0 (0% lost) Approximate round trip time in milliseconds Minimum = 0ms, Maximum = 0ms, Average = 0ms
-
Test connectivity between the AWS Region and the Outpost. Use
run-instance
to launch an instance in the subnet in the AWS Region. For more information, see run-instances in the AWS CLI Command Reference.Example
aws ec2 run-instances --image-id ami-abc12345 --count 1 --instance-type c5.large --key-name MyKeyPair --security-group-ids sg-1a2b3c4d --subnet-id subnet-6e7f829e
After the instance is running, perform the following operations:
-
Get the AWS Region instance private IP address, for example 10.0.0.5. This information is available in the Amazon EC2 console on the instance detail page.
-
Depending on your operating system, use ssh or rdp to connect to the private IP address of your Outpost instance.
-
Run the
ping
command from your Outpost instance to the AWS Region instance IP address. In the following example, the IP address is 10.0.0.5.ping 10.0.0.5 Pinging 10.0.0.5 Reply from 10.0.0.5: bytes=32 time=<1ms TTL=128 Reply from 10.0.0.5: bytes=32 time=<1ms TTL=128 Reply from 10.0.0.5: bytes=32 time=<1ms TTL=128 Ping statistics for 10.0.0.5 Packets: Sent = 3, Received = 3, Lost = 0 (0% lost) Approximate round trip time in milliseconds Minimum = 0ms, Maximum = 0ms, Average = 0ms
-