Angle Tom
Angle Tom

Reputation: 1130

How to config the api gateway for the service deployed in private subnet?

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?

Upvotes: 8

Views: 3238

Answers (2)

Mark B
Mark B

Reputation: 201138

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.

Upvotes: 10

Jason
Jason

Reputation: 10952

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.

Upvotes: 2

Related Questions