HTTP API - Best Practices for Designing Amazon API Gateway Private APIs and Private Integration

HTTP API

HTTP API is a new flavor of API Gateway. Benefits of using the API include delivering enhanced features, improved performance, and an easier developer experience. In addition, HTTP APIs come with reduced request pricing.

For private integrations, HTTP APIs offer additional integration endpoints for a VPC link, such as ALBs, NLBs, and AWS Cloud Map. For any existing applications or microservices that have ALBs or AWS Cloud Map to route traffic, you can use the same setup. HTTP APIs can route traffic to those endpoints through a VPC link.

Private Integration

Because HTTP APIs offer three different private integration targets, you should consider which integration target best suits your use case. Depending on the backend service, one or more targets can be used by creating multiple VPC endpoints.

Table 2 – HTTP API Private Integration

Integration target Listener Use cases
NLB TCP or TLS listener

TLS passthrough is possible

High throughput

ALB HTTP or HTTPS listener

Layer 7 routing

Content-based routing

AWS Cloud Map

Namespace/Service

AWS Cloud Map parameters (optional)

Service discovery

Sample Architecture Patterns

ALB Architecture (Amazon ECS)

HTTP API private integration allows NLB and ALB for integration targets for load balancers. If you have any backend service fronted with ALBs, you can use the existing setup without re-architecture. Because ALBs allow different routing options, such as path-based routing, this option provides flexibility on the ALB routing level. To create listener rules to achieve path-based routing, see Listener rules for your Application Load Balancer.

Figure 6 shows private integration with Application Load Balancer in HTTP API. The ALB uses path-based routing rules to route traffic to two different Amazon ECS services.


          Architecture diagram showing HTTP API private integration with Application Load Balancer

Figure 6 – HTTP API private integration with Application Load Balancer

AWS Cloud Map Architecture (Microservices)

With the AWS Cloud Map target option, you can use AWS Cloud Map to discover services like Amazon ECS and Amazon EC2-based services. Using AWS Cloud Map as a front-end service for microservices, you can leverage a private integration with an AWS Cloud Map target in HTTP APIs to route requests to different endpoints.


          Architecture diagram showing HTTP API private integration with AWS Cloud Map

Figure 7 – HTTP API private integration with AWS Cloud Map