2

So i have a Custom Domain Name setup for api gateway linked to a lambda function. I have it working fine if i do https://api_domain.com/something the behavior is as expected.

Resource: /{proxy+} Base Path Mappings: /

But when i go to the root domain and try to display something for that url i can't get it to work

https://api_domain.com/

{"message":"Missing Authentication Token"}

Searching around i found;

The "Missing Authentication Token" error might be happening if you aren't adding the resource to your uri. For me, browsing to https://{api_domain}/{stage} results in that error. If you do https://{api_domain}/{stage}/{resource_name} then the error may disappear.

Is there a way to display something custom for the root domain or is the only option to display that ugly error?

1

1 Answer 1

1

Add a method to the / root resource. As you have discovered the /{proxy+} doesn't match the root, you have to handle it separately.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.