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 回答
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
已回答 2 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则