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 Answer
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
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions