Set up an AWS resource endpoint connection

Uses: Kong Gateway
TL;DR

AWS resource endpoints with Dedicated Cloud Gateway enables secure, one-way connectivity from Konnect’s managed infrastructure to your upstream services without requiring VPC peering or Transit Gateway. First, configure a resource share in AWS and set your Konnect AWS account ID as a principal on the resource share. Configure private networking for you Dedicated Cloud Gateway and select Resource endpoint connection. Enter your resource share ARN from AWS as well as your resource configuration ID and domain name.

Prerequisites

This is a Konnect tutorial that requires Dedicated Cloud Gateways access.

If you don’t have a Konnect account, you can get started quickly with our onboarding wizard.

  1. The following Konnect items are required to complete this tutorial:
    • Personal access token (PAT): Create a new personal access token by opening the Konnect PAT page and selecting Generate Token.
    • Dedicated Cloud Gateway Control Plane: You can use an existing Dedicated Cloud Gateway or create a new one to use for this tutorial.
    • Network ID: The default Dedicated Cloud Gateway network ID can be found in API Gateway > Network
  2. Set these values as environment variables:

     export KONNECT_TOKEN='YOUR KONNECT TOKEN'
     export KONNECT_NETWORK_ID='KONNECT NETWORK ID'

You need an AWS IAM user account with permissions to create AWS Resource Configuration Groups, Resource Gateways, and to use AWS Resource Access Manager (RAM).

You also need:

Important: Your resource gateway’s subnet must be in an Availability Zone (AZ) that overlaps with your Dedicated Cloud Gateway network’s AZs. If there’s no AZ overlap, Konnect can’t establish the connection, and the resource endpoint config shows as missing, with no other indication of the cause. Check which AZs your Dedicated Cloud Gateway network supports before you create your resource gateway, and place it in a subnet within an overlapping AZ.

Copy and save the resource configuration ID for each resource configuration.

Choose a domain name for each resource configuration, for example myupstream.internal. This domain doesn’t need to exist in AWS. Konnect uses it to create a mapping between the domain name and the resource configuration ID, and creates a CNAME record pointing your chosen domain to the resource configuration.

Export your chosen domain name:

export UPSTREAM_DOMAIN_NAME='http://YOUR-UPSTREAM-DOMAIN-NAME/anything'

We’ll use this to connect to our Dedicated Cloud Gateway service.

For this tutorial, you’ll need Kong Gateway entities, like Gateway Services and Routes, pre-configured. These entities are essential for Kong Gateway to function but installing them isn’t the focus of this guide. Follow these steps to pre-configure them:

  1. In the Konnect sidebar, navigate to API Gateway.
  2. Click your Dedicated Cloud Gateway.
  3. Click the Gateway Services tab.
  4. Click New gateway service.
  5. In the Full URL field, enter the domain name you chose in the prerequisites, appended with /anything. For example: http://YOUR-UPSTREAM-DOMAIN-NAME/anything
  6. In the Name field, enter example-service.
  7. Click Save.
  8. Click the Routes tab.
  9. Click New route.
  10. In the Name field, enter example-route.
  11. In the Path field, enter /anything.
  12. Click Save.

To learn more about entities, you can read our entities documentation.

AWS resource endpoints with Dedicated Cloud Gateway enables secure, one-way connectivity from Konnect’s managed infrastructure to your upstream services without requiring VPC peering or Transit Gateway.

AWS VPC endpoints, part of the AWS VPC Lattice offering, allow services in one AWS account to be securely shared with and accessed from another account via a single VPC endpoint. This eliminates the need for:

  • Multiple PrivateLinks
  • Individual TLS workarounds for each service
  • Complex two-way handshakes

Copy and save your Konnect Account ID

Before you can configure AWS, you’ll need your account ID for AWS in Konnect. AWS uses this account ID to configure the connection between your resource share in AWS and Konnect.

  1. In the Konnect sidebar, click Networks.
  2. Click the settings icon next to your network.
  3. Click Configure private networking.
  4. Click Resource endpoint connection.
  5. Copy and save the ID in the Kong AWS Account ID field.

Create a resource share in AWS

To use AWS resource endpoints with Dedicated Cloud Gateways, you must first create a resource share with your resource configuration group and resource gateway in AWS.

  1. In the AWS console, navigate to RAM.
  2. Click Create resource share.
  3. In the Name field, enter Kong-DCGW-Resource-Share.
  4. From the Resource type dropdown menu, select “VPC Lattice Resource Configurations”.
  5. Select the ARN of your resource configuration.
  6. In the Selected resources settings, select your resource group IDs.
  7. Click Next.
  8. Click Next.
  9. In the Principals settings, select Allow sharing with anyone.
  10. From the Select principal type dropdown menu, select “AWS Account”.
  11. In the AWS Account field, enter your account ID from Konnect.
  12. Click Next.
  13. Click Create resource share.

Important: Create a separate RAM share for each shared resource (do not include multiple resources in a single RAM share).

Configure the resource endpoint connection in Konnect

Now that the resource share is configured in AWS, you can connect it with Konnect to enable the resource endpoint connection.

  1. In the Konnect sidebar, click Networks.
  2. Click the action menu icon next to your network.
  3. Click Configure private networking.
  4. Click Resource endpoint connection.
  5. In the Resource links configuration name field, enter AWS-Resource-Share.
  6. In the AWS RAM share ARN field, enter your ARN.
  7. Click Submit.

    It may take a few minutes for Konnect’s automation to accept the RAM share and create VPC endpoints. You can check the status of your resource endpoints in the table.

  8. Click the action menu icon. Now you need to manually map your resource configuration IDs from AWS to Konnect once your resource endpoint is marked as Ready.
  9. Click Edit.
  10. In the Resource configuration ID field, enter your enter your resource configuration ID from AWS.

    Note: If your resource configuration has a child resource configuration, use the ID from the child resource.

  11. In the Domain name field, enter the domain name you chose in the prerequisites.

    Note: If your resource configuration has a child resource configuration, use the domain name from the child resource.

  12. Click Submit.

It may take a few minutes for automation to update the private hosted zones and DNS settings before upstream routing will work.

Validate

Once the resource configuration mapping displays as Ready, your resource endpoint connection is set up successfully.

Additionally, you can validate that the resource endpoint connections in Konnect are working correctly by navigating to your Gateway Service configured in the prerequisites:

curl -i -X GET "$UPSTREAM_DOMAIN_NAME"

Configure VPC security group inbound rules

When using AWS Resource Endpoints with Dedicated Cloud Gateways, your resource gateway is the point of inbound traffic into your VPC for the resource you shared. Traffic from your Dedicated Cloud Gateway arrives at your backend resources sourced from the resource gateway’s own elastic network interface (ENI), using a normal IP address from the subnet you assigned to the resource gateway when you created it.

To allow this traffic, create a dedicated security group for your resource gateway, then reference that security group (not an IP range or prefix list) as the allowed source on your backend target’s security group (for example, EC2 instances, Application Load Balancers, Network Load Balancers, or target Elastic Network Interfaces).

  1. In AWS, navigate to your VPC console.
  2. From the VPC sidebar, click Security groups.
  3. Create a new security group (for example, sg-resource-gateway) and attach it only to your resource gateway.
  4. Navigate to the security group for your backend target resource.
  5. Add an inbound rule for the relevant port (for example, TCP/443).
  6. In the Source field, select the dedicated resource gateway security group you created.

Create a new security group for each backend resource that receives traffic through the resource gateway.

Troubleshooting timeouts

If requests time out and your NLB shows no incoming traffic:

  • Verify that the security group attached to your backend allows inbound traffic from the resource gateway’s dedicated security group.
  • Confirm your resource gateway’s subnet has an Availability Zone (AZ) that overlaps with your Dedicated Cloud Gateway network’s AZs. This is a common, hard-to-diagnose failure mode: without AZ overlap, the resource endpoint config can show as missing in Konnect, even though nothing else is misconfigured.
  • Validate the Resource Endpoint connection is in the READY state in Konnect.
  • Confirm the Gateway Service upstream host matches the Resource Endpoint domain name.
  • Check NLB target group health.
  • Confirm backend subnet network access control lists (NACLs) allow inbound and outbound traffic from the resource gateway’s subnet. Security groups are stateful; a restrictive NACL silently drops the return path.
  • Confirm the NLB listener protocol and port matches the resource configuration’s accepted listener.

FAQs

Dedicated Cloud Gateways supports specific Availability Zones (AZs) in the supported AWS regions. Your resource gateway must be in a subnet within an AZ that overlaps with your Dedicated Cloud Gateway network’s AZs, or the connection can’t be established.

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!