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. (
CodePudding user response:
It is not possible to create one AWS REST API Gateway which is both private and public (either regional or edge optimized). You will have to create two separate API Gateways. You can have the same configurations in both API Gateways in terms of backend integrations.
If you try to specify two endpoint types for the CreateRestAPI operation when using a SDK/CLI you would get the following error:
An error occurred (BadRequestException) when calling the CreateRestApi operation: Cannot create an api with multiple Endpoint Types.