I want to integrate an Amazon API Gateway REST API with an Application Load Balancer. How can I do that using API Gateway integrations?
To integrate your API Gateway REST API with a public Application Load Balancer, use API Gateway HTTP integration.
For private Application Load Balancers, use API Gateway VPC link to first connect to a private Network Load Balancer. Then, use the Network Load Balancer to forward API Gateway requests to the private Application Load Balancer.
Note: There's currently no direct API Gateway integration for private Application Load Balancers.
To integrate an API Gateway REST API with a public Application Load Balancer
Note: The following procedure assumes two things:
- You have access to a public Application Load Balancer and its DNS name.
- You have an API Gateway REST API resource with an HTTP method.
1. In the API Gateway console, choose the API you want to integrate with the Application Load Balancer.
2. In the Resources pane, for Methods, choose the HTTP method that your API uses.
3. Choose Integration Request.
4. In the Integration Request pane, for Integration Type, choose HTTP.
Note: To pass the entire API request and its parameters to the backend Application Load Balancer, create one of the following instead:
An HTTP proxy integration
An HTTP custom integration
For more information, see Set up HTTP integrations in API Gateway.
5. In the Endpoint URL field, enter either the Application Load Balancer's default DNS name or custom DNS name. Then, add the configured protocol of its listener. For example, an Application Load Balancer that's configured with an HTTPS listener on port 8080 requires the following endpoint URL format: https://domain-name:8080/
Important: Make sure that you create an HTTP listener or HTTPS listener for the Application Load Balancer using the port and listener rules of your choice. For more information, see Listeners for your Application Load Balancers. For an Application Load Balancer configured with an HTTPS listener, the associated certificate must be issued by an API Gateway-supported certificate authority. If you have to use a certificate that's self-signed or issued by a private certificate authority, then set insecureSkipVerification to true in the integration's tlsConfig.
6. Choose Save.
7. Deploy the API.
To integrate an API Gateway REST API with a private Application Load Balancer
1. Use API Gateway VPC link integration to integrate your API with a private Network Load Balancer.
2. Use the Network Load Balancer to forward the API request to the private Application Load Balancer.