0
votes

I am trying to setup a microservice architecture on AWS, each microservice is a REST API.

Some of the services are running on ECS using Fargate and some of the services are running as a set of lambdas.

I am trying to have each api route resolve to the correct service, whether it is a ECS or Lambda based service.

I can see how it would be possible using only ECS services (with Application Load Balancer and listeners) or using only Lambdas (with an API Gateway). But I just cant seem to figure out how to mix the two together.

I have been searching relentlessly all week and I cannot find any decent documentation or an example of how to implement something similar to this.

architecture diagram

There appears to be a limit to the number of routes for ALB or API Gateway. If I have several lambda based services there will need to be a declared path for each Lambda function and they will use up the path limit very quickly.

Should there be an intermediary step between each service and the API Gateway? For instance, each Lambda service has its own API Gateway which 'groups' those functions together. Which would mean there will be a nested set of API Gateways that the parent API Gateway routes to. This doesn't feel correct though.

Any help in the right direction would be appreciated.

Thanks

1
Why not connect lambdas directly to API gateway? Why do you want lambdas behind ALB?Marcin

1 Answers

1
votes

Your AWS account's API Gateway REST and Websocket routes/resources limit can be increased with a request to AWS support.