I deployed a web service in my private subnet without ELB in public subnet.
Now I want to expose it to public. Can I use API gateway as the http proxy
to make it public?
Anyone knows how to do that?
In the API Gateway service, an API gateway is a virtual network appliance in a regional subnet. Private API gateways can only be accessed by resources in the same subnet.
The service has to be public for API Gateway to be able to connect to it. You can use SSL Client certs to restrict access to only API Gateway. Otherwise, API Gateway would not be a good solution to your issue.
Update: You can now configure API Gateway to access resources inside a VPC using VPC Link.
In addition to @Mark B's excellent answer, you could also consider using a Lambda function as a proxy.
API Gateway -> Lambda -> ELB
You can configure Lambda to access VPC resources. Lambda would have to buffer the entire result before returning it, so this would slow down large responses.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With