- Newest
- Most votes
- Most comments
Thank you for the detailed description. To proceed, check the x-amzn-errortype
header in the 403 error and refer to this article for the resolution.
Based on the description, it's likely that the 403 is due to the domain URL includes the stage
while stage (v1
in the provided example) is not necessary.
Hello, the x-amzn-errortype value is "ForbiddenException". I can see several use cases for that in the page you indicated. I also tried to call my endpoint without the stage but I got the same error. I'd need stages anyway as I want to be able to test my API on another stage.
thank you
The 403 error is due to the domain URL includes the stage v1 while invoking the API. After creating custom domain you must map the API with its stage name. As you map the API stage name with the custom domain you do not need to add the stage name along with the custom domain while invoking the API.
While mapping the API to custom domain, there is an optional column for adding base path mapping. For your use-case, you can add your stage name v1 in the base path mapping as well. Thus, you will be able to invoke your API as follows: https://api.mydomain.com/v1
Relevant content
- Accepted Answerasked 2 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
Did you go through this? https://aws.amazon.com/premiumsupport/knowledge-center/custom-domain-name-amazon-api-gateway/