0
votes

I have an implementation of API Gateway as proxy to a Lambda function (which is the one that returns the statusCode and payload)

The invokation url is something like:

https://5656tre23.execute-api.us-east-1.amazonaws.com/dev

I have the following path: /book/${some-uuid}

Full URL: https://5656tre23.execute-api.us-east-1.amazonaws.com/dev/book/${some-uuid}

I also created a custom domain: api.mydomain.com/ which resolves to https://5656tre23.execute-api.us-east-1.amazonaws.com/dev/

If I pass the full path, it works with both, regular Api Gateway URL and with the custom domain. Example: api.mydomain.com/book/${some-uuid}

However, if the I enter:

I receive the following message

{"message":"Missing Authentication Token"}

What I want, if the I go to:

  • /dev
  • /dev/book
  • or anything else than https://5656tre23.execute-api.us-east-1.amazonaws.com/dev/book/${some-uuid} redirect to mydomain.com

I will appreciate help.

1

1 Answers

0
votes

Do you have some sort of authentication setup? Like catapult?

If so, you will need to add all of your endpoints to that policy in order to access them. Check out: https://aws.amazon.com/blogs/compute/control-access-to-your-apis-using-amazon-api-gateway-resource-policies/