I'm exploring options to invoke a lambda function via an HTTP call using AWS api gateway. I have an existing Nginx load balancer, serving micro services. When I try to add a location block adding a proxy pass to the aws api gateway,
location /foo {
proxy_pass <aws api gateway url>;
}
this is resolving the hostname to IP eg: 10.20.30.40, but AWS API gateway is returning 400 Bad Request when querying directly from the IP.
Is there any way I can invoke lambda using AWS API gateway from my existing nginx server?