AWS API Gateway custom domain path configuration

16 Views Asked by At

After a day of studying I am still confused with how to correctly configure a custom domain to AWS API Gateway so I can use the same custom domain for multiple APIs.

So I have already deployed my custom domain api.my-domain.com and obtained a ACM certificate. I created CNAME to point api.my-domain.com to the API Gateway domain name and can access it.

However, I am confused how to configure "API mappings". According to https://docs.aws.amazon.com/apigateway/latest/developerguide/rest-api-mappings.html?icmpid=apigateway_console_help, I can use different path (which is also called "ApiMapping key") to route requests to different API endpoints. My current configurations are:

API: api1        stage: default        path: path1
API: api2        stage: default        path: path2

However, I can not access either APIs. Sending requests to api.my-domain.com/path1 or api.my-domain.com/path2 returns a 403 "message": "Missing Authentication Token" error, sending requests to any other non-existing path will return a 403 "message": "Forbidden" error.

I am not sure if I misconfigured something, or I am not accessing those APIs with the correct way?

0

There are 0 best solutions below