Call ECS Service from Lambda

0

Hi Team, how can I call an ecs service from a lambda function. Both are in the same VPC and private subnet. ECS Services should communicate through Service Connect, but how can a Lambda function call an ECS Service? My plan is to create an API GW which redirects the requests to the ALB. ALB will route traffic with path redirecting to the ECS Services. So my question is: How can a Lambda Function call an ECS Service without involving API GW and in best case also ALB. Is there any option to discover ECS Services within the Lambda?

1 Antwort
0

Hello!

Service Connect still uses Cloud Map as a service registry. You can use Cloud Map's discover-instances API to resolve the IP addresses of your ECS workloads, and connect to them directly.

Is this what you are looking for?

profile pictureAWS
beantwortet vor 2 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen