title: how to invoke a request to a network load balancer(nlb) vpc endpoint from a lambda function in aws
body: <p>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.</p>
  <p>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.</p>
  <p>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.</p>
  <p>Thanks!
  <a href="https://i.stack.imgur.com/pjYTS.jpg" rel="nofollow noreferrer">my aws vpc endpoint description</a></p>