I created a service in ECS running a task on many instances for high availability. I created an internal network load balancer and a vpc endpoint, and I registered the service's instances to the nlb's target group. I have an API gateway to receive external requests from the client, and I want to pass these requests to the service and get a response.
I know I can integrate my API Gateway with VPC and attach to the nlb, and it worked. But its not sufficient, and I need to integrate the gateway's endpoint with a lambda to perform more actions on the service responses.
I want to perform a request from the lambda to the vpc/nlb endpoint and get a response from one of the instances, but I cant find anywhere how to do this. Is there a boto3 or any other way to properly invoke a request to the endpoint? like with sagemaker.
Thanks! my aws vpc endpoint description