- Newest
- Most votes
- Most comments
I think you're asking "can I make an API (in API Gateway) accessible via a VPC endpoint" and the answer is: no, you can't do that. When you create the API you specify whether it is Edge-optimised, Regional or Private.
This is explained in the launch blog post: https://aws.amazon.com/blogs/compute/introducing-amazon-api-gateway-private-endpoints/
The VPC Endpoints are only meant for Private API Gateway endpoints. When you create private APIs, they can only be accessed from your VPC using an interface VPC endpoint. On the other hand, when you interface with API Gateway publicly accessible endpoints (For example: Regional APIs), it is done through public networks [1][2]. Therefore, it is not possible to connect to public APIs using a VPC endpoint.
However, there is a workaround if you want to access both Public and Private endpoints in your VPC and it has been explained in this article [3][4].
References:
[1] https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-apis.html [2] https://aws.amazon.com/blogs/compute/introducing-amazon-api-gateway-private-endpoints/ [3] https://repost.aws/questions/QUbbn6lHHbQUC4buf6Za_7og/accessing-api-gateway-both-public-and-private-endpoint [4] https://repost.aws/knowledge-center/api-gateway-vpc-connections
Relevant content
- Accepted Answerasked 3 years ago
- Accepted Answerasked a year ago
- How do I use an interface VPC endpoint to access an API Gateway private REST API in another account?AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago