Launch an instance on your Outpost - AWS Outposts

Launch an instance on your Outpost

After your Outpost is installed and the compute and storage capacity is available for use, you can launch EC2 instances and create EBS volumes on your Outpost using an Outpost subnet.

Prerequisite

You must have an Outpost installed at your site. For more information, see Create an Outpost and order Outpost capacity.

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.

Note

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

  1. Open the AWS Outposts console at https://console.aws.amazon.com/outposts/.

  2. On the navigation pane, choose Outposts.

  3. Select the Outpost, and then choose Actions, Create subnet.

  4. Select the VPC and specify an IP address range for the subnet.

  5. 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.

AWS Outposts console

To launch an instance in your Outpost subnet

  1. Open the AWS Outposts console at https://console.aws.amazon.com/outposts/.

  2. On the navigation pane, choose Outposts.

  3. Select the Outpost, and then choose Actions, View details.

  4. On the Outpost summary page, choose Launch instance. You are redirected to the Amazon EC2 console.

  5. Follow the steps in the Amazon EC2 Launch Instance Wizard to launch the instance in your Outpost subnet. For more information, see Launching an instance using the Launch Instance Wizard.

AWS CLI

To launch an instance in your Outpost subnet

  • Use the run-instances to launch an instance in your Outpost subnet. For more information about launching an instance, 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

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:

Amazon EC2 console

To allocate and associate an Elastic IP address with the instance

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose Elastic IPs.

  3. Choose Allocate new address.

  4. For Network Border Group, select the location from which the IP address is advertised.

  5. For Public IPv4 address pool, choose Customer owned IPv4 address pool.

  6. For Customer owned IPv4 address pool, select the pool that you configured.

  7. Choose Allocate, and close the confirmation screen.

  8. In the navigation pane, choose Elastic IPs.

  9. Select an Elastic IP address, and choose Actions, Associate address.

  10. Select the instance from Instance, and then choose Associate.

AWS CLI

To allocate and associate an Elastic IP address with the instance

  1. Use describe-coip-pools to retrieve information about your specified customer-owned address pools. For more information, see describe-coip-pools in the AWS CLI Command Reference.

    Note the PoolId return value.

    Example

    aws ec2 describe-coip-pools

    Output

    { "CoipPools":[ { "Poolid": "ipv4pool-coip-0abcdef0123456789", "Poolcidrs": [ "192.168.0.0/16" ], LocalGatewayRouteTableId": "lgw-rtb-0abcdef0123456789" } ] }
  2. Use allocate-address to allocate an Elastic IP address. For more information, see allocate-address in the AWS CLI Command Reference.

    Use the customer-owned-ipv4-pool option with the PoolId returned in the previous step.

    Example

    aws ec2 allocate-address--address 192.0.2.128 --customer-owned-ipv4-pool ipv4pool-coip-0abcdef0123456789

    Output

    { "CustomerOwnedIp": "192.0.2.128", "AllocationId": "eipalloc-02463d08ceEXAMPLE", "CustomerOwnedIpv4Pool": "ipv4pool-coip-0abcdef0123456789", }
  3. Use associate-address to associate the Elastic IP address with the Outpost instance. For more information, see associate-address in the AWS CLI Command Reference.

    Example

    aws ec2 associate-address --allocation-id eipalloc-02463d08ceEXAMPLE --network-interface-id eni-1a2b3c4d

    Output

    { "AssociationId": "eipassoc-02463d08ceEXAMPLE", }

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

  1. Associate the VPC with the local gateway route table as follows:

    1. On the navigation pane, choose Local gateway route tables.

    2. Select the route table, and then choose Actions, Associate VPC.

    3. For VPC, select the VPC to associate with the local gateway route table.

    4. Choose Associate VPC.

  2. 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.

    1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

    2. In the navigation pane, choose Route Tables.

    3. Select the route table associated with the subnet, and then choose Actions, Edit routes.

    4. Choose Add route.

    5. For Destination, enter the CIDR for the local network.

    6. For Target, select the ID of the local gateway.

    7. 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:

    1. 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.

    2. Depending on your operating system, use ssh or rdp to connect to the private IP address of your Outpost instance.

    3. 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