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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南