Mihir Shah
Mihir Shah

Reputation: 1809

how to add AWS API gateway with application load balancer for ECS?

How to integrate API gateway with application load balancer? I have integrated ECS with ALB, now I want to add API gateway in front without lambda. But I got confused how to connect API gateway with ALB..

Upvotes: 8

Views: 11176

Answers (2)

sujeet kumar
sujeet kumar

Reputation: 1

Yes you can do . Inside API Gateway under integration type select HTTP and then provide complete path of ALB with endpoint resource.

Upvotes: 0

Maurice
Maurice

Reputation: 13108

What you're probably looking for is the HTTP Proxy Integration as described here

The basic idea is this:

  1. Set up your API-Gateway with a greedy path like /{proxy+} on the ANY Method
  2. Set the backend-endpoint to https://my-alb-endpoint.com/ecs-service-bla/{proxy}
  3. (hopefully) success

To make this work, your backend needs to be exposed to the internet (or at least reachable for the API Gateway)!

You probably should keep your backend within a locked down VPC, but for this you're going to need to set up a private integration, which requires a Network Load balancer - this might be costlier, but would be the recommended approach.

Upvotes: 3

Related Questions