0
votes

Is it possible for an API Gateway to reach private EC2s?

Is it possible to create an "internal" API Gateway which exposes internal URL (i.e. services reachable only in the private subnets) which can in turn be accessed only from within the VPC? I would like to do something like ALB does, when you create an internal load balancer. For example, I expose a rest ws from an ec2 instance which resides on a private subnet; I would like to expose that ws through an API Gateway to only other EC2s within the same VPC. I'm able to expose privately public web services through a Private API Gateway, but what if also the exposed ws is private? Is it possible for an API Gateway to reach private EC2s?

Thanks

1

1 Answers

2
votes

Yes, you are looking for API Gateway Private Endpoints

Each endpoint is an elastic network interface configured in your VPC that has security groups configured.

To integrate API Gateway with private VPC resources, use private integrations