简体   繁体   中英

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..

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM