Working with local gateways - AWS Outposts

Working with local gateways

A local gateway serves two purposes. It provides a target in your VPC route tables for on-premises destined traffic, and it performs network address translation (NAT) for instances that have been assigned addresses from your customer-owned IP pool. You can also use the local gateway for communication between your Outpost and its parent AWS Region.

Each Outpost supports one local gateway. The AWS account associated with the Outpost owns the local gateway.

A local gateway has the following components:

  • Route tables - AWS creates a local gateway for your Outpost, and a local gateway route table as part of the installation process. VPC route tables associated with subnets that reside on an Outpost can use the local gateway as a route target.

  • Virtual interfaces (VIFs) - AWS creates one VIF for each LAG, and then associates the VIF with the default local gateway route table. The local gateway route table has a default route to the two VIFs for local network connectivity.

AWS configures a local gateway for your Outpost and a local gateway route table during the installation process. Each Outpost supports a single local gateway. The local gateway is owned by the AWS account associated with the Outpost. You can share the local gateway with other AWS accounts or organizational units using AWS Resource Access Manager.

Local gateways

Manage local gateway tags

You can tag your local gateways to help you identify them or categorize them according to your organization's needs.

AWS Outposts console

To manage the local gateway tags

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

  2. On the navigation pane, choose Local gateways.

  3. Select the local gateway route table, and then choose Manage tags.

  4. Add or remove a tag.

    To add a tag, choose Add new tag and do the following:

    • For Key, enter the key name.

    • For Value, enter the key value.

    To remove a tag, choose Remove to the right of the tag’s key and value.

  5. Choose Save changes.

Local gateway route tables

AWS creates a local gateway for your Outpost, and a local gateway route table as part of the installation process. AWS configures two VIFs, one for each of the Outpost network devices (ONDs) that are physically connected to the local network.

View local gateway route table routes

The local gateway route table is configured with a default route to each of the VIFs. After the route tables are provisioned, you can view the local gateway route tables using the AWS Outposts console, or the AWS CLI;

AWS Outposts console

To view the local gateway route table routes

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

  2. On the navigation pane, choose Local gateways, and then select the local gateway.

  3. Select the local gateway route table.

  4. Choose Routes to see the route for each VIF.

AWS CLI

To view the local gateway route table routes

Use the describe-local-gateway-route-tables AWS CLI command.

Example

aws ec2 describe-local-gateway-route-tables

Output

{ "LocalGatewayRouteTables": [ { "LocalGatewayRouteTableId": "lgw-rtb-059615ef7deEXAMPLE", "LocalGatewayId": "lgw-09b493aa7cEXAMPLE", "OutpostArn": "arn:aws:outposts:us-west-2:111122223333:outpost/op-0dc11b66edEXAMPLE", "State": "available" } ] }

Manage local gateway route table tags

You can tag your local gateway route tables to help you identify them or categorize them according to your organization's needs.

AWS Outposts console

To manage the local gateway route table tags

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

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

  3. Select the local gateway route table, and then choose Actions, Manage tags.

  4. Add or remove a tag.

    To add a tag, choose Add new tag and do the following:

    • For Key, enter the key name.

    • For Value, enter the key value.

    To remove a tag, choose Remove to the right of the tag’s key and value.

  5. Choose Save changes.

VPC associations

You must associate the VPCs with your local gateway route table. They are not associated by default.

Create a VPC association

Use the following procedure to associate a VPC with a local gateway route table.

You can optionally tag your association to help you identify it or categorize it according to your organization's needs.

AWS Outposts console

To associate a VPC

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

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

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

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

  5. (Optional) Add or remove a tag.

    To add a tag, choose Add new tag and do the following:

    • For Key, enter the key name.

    • For Value, enter the key value.

    To remove a tag, choose Remove to the right of the tag’s key and value.

  6. Choose Associate VPC.

AWS CLI

To associate a VPC

Use the create-local-gateway-route-table-vpc-association command.

aws ec2 create-local-gateway-route-table-vpc-association --local-gateway-route-table-id local gateway route table id --vpc-id vpc id

Example

aws ec2 create-local-gateway-route-table-vpc-association --local-gateway-route-table-id lgw-rtb-059615ef7dEXAMPLE --vpc-id vpc-07ef66ac71EXAMPLE

Output

{ "LocalGatewayRouteTableVpcAssociation": { "LocalGatewayRouteTableVpcAssociationId": "lgw-vpc-assoc-0ee765bcc8EXAMPLE", "LocalGatewayRouteTableId": "lgw-rtb-059615ef7dEXAMPLE", "LocalGatewayId": "lgw-09b493aa7cEXAMPLE", "VpcId": "vpc-07ef66ac71EXAMPLE", "State": "associated" } }

Delete a VPC association

Use the following procedure to disassociate a VPC from a local gateway route table.

AWS Outposts console

To disassociate a VPC

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

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

  3. Select the route table.

  4. Select the VPC, and then choose Disassociate.

AWS CLI

To disassociate a VPC

Use the delete-local-gateway-route-table-vpc-association command.

aws ec2 delete-local-gateway-route-table-vpc-association --local-gateway-route-table-id local gateway route table id --vpc-id vpc id

Example

aws ec2 delete-local-gateway-route-table-vpc-association --local-gateway-route-table-id lgw-rtb-059615ef7dEXAMPLE --vpc-id vpc-07ef66ac71EXAMPLE

Output

{ "LocalGatewayRouteTableVpcAssociation": { "LocalGatewayRouteTableVpcAssociationId": "lgw-vpc-assoc-0ee765bcc8EXAMPLE", "LocalGatewayRouteTableId": "lgw-rtb-059615ef7dEXAMPLE", "LocalGatewayId": "lgw-09b493aa7cEXAMPLE", "VpcId": "vpc-07ef66ac71EXAMPLE", "State": "associated" } }