'AWS API Gateway: Create one API for both public access and private access

I would like to achieve these below. What are good ways?

  • Make one API on API Gateway. (I prefer one API over two APIs to save maintenance cost.)
  • The API can be accessed from the internet.
  • The API can be accessed from the VPC without data transfer out charges. (https://aws.amazon.com/api-gateway/pricing/ "There are no data transfer out charges for Private APIs.")

Problems I face to

  • In API Gateway settings, I can choose either "Regional" or "Private" (never both).

Expected structure Expected structure



Sources

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

Source: Stack Overflow

Solution Source