Skip to content

How do I integrate WebSocket APIs with Amazon VPC resources in API Gateway?

2 minute read
0

I want to integrate WebSocket APIs with Amazon Virtual Private Cloud (Amazon VPC) resources in Amazon API Gateway.

Resolution

Create a WebSocket API

Use the API Gateway console to create a WebSocket API.

Create a Network Load Balancer

For more information, see Create a Network Load Balancer.

Create a VPC Link for the WebSocket API

Complete the following steps:

  1. Open the API Gateway console.
  2. In the navigation pane, choose VPC links, and then choose Create.
  3. For Choose a VPC link version, choose VPC link for REST APIs.
  4. For Name, enter a name for your VPC link.
  5. For Target NLB, enter the name of your Network Load Balancer, and then select it.
  6. Choose Create.

Create a Network Load Balancer target group

For more information, see Create a target group for your Network Load Balancer.

Configure the WebSocket API integration

For more information, see Set up a WebSocket API integration request in API Gateway.

Deploy the WebSocket API

Use the API Gateway console to deploy a WebSocket API.

Related information

Private integrations for REST APIs in API Gateway