'Can I allow inbound traffic from internet to a private api gateway in a private aws vpc?

In aws, I have a private api gateway in my vpc. I want to allow one specific public ip to be allowed to send request to this private api while blocking all other public IP.

How do I achieve this? If I allow the security group and nacl for this one ip, could that ip able to invoke the api? Or would creating a proxy for the IP/ domain work?



Solution 1:[1]

Private API means not accessible from internet. So you can't enable any pubic IP to access it.

You have to develop some proxy for that. Probably the easiest would be a lambda function. So instead of directly calling the API, you use call lambda function which in turns calls the private api.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Marcin