aws / containers-roadmap

This is the public roadmap for AWS container services (ECS, ECR, Fargate, and EKS).
https://aws.amazon.com/about-aws/whats-new/containers/
Other
5.21k stars 318 forks source link

[ECS] [APIGateway]: Allow APIGateway to directly route requests to ECS containers #893

Open jadeallenx opened 4 years ago

jadeallenx commented 4 years ago

Community Note

Tell us about your request I would like for ECS to be able to directly handle requests from APIGateway

Which service(s) is this request for? ECS (we use Fargate, but this particular request could be for any kind of ECS workload)

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? I want to specify a URL route in APIGateway and I want those routes to be sent directly to ECS containers without the need for an extra load balancer in the way.

Are you currently working around this issue? We provisioned an ALB and are only using it to service requests. ALBs are great but they do not have the same kind of AuthN/AuthZ capabilities/integrations that APIGateway provides.

kohidave commented 4 years ago

Hiya! One option to not use an ELB for API Gateway -> ECS is to use CloudMap + ECS like here. You can then route your API requests to your ECS Service!

The steps to do this are:

  1. Set up an ECS Service with Service Discovery (CloudMap)
  2. Create a API Gateway Rest/HTTP API
  3. Create an API Gateway VPC Link
  4. Configure a private integration for your API with CloudMap