I have an API Gateway resource that is proxied to an AWS Lambda function. This worked fine for passing through trailing path parameters (/periodicals/{tail+}
), but as I wanted those parameters to be optional, I also added an ANY
method to the higher resource (/periodicals
):
This works fine when testing that method from within the AWS Console. Directly performing a request on that resource from my browser, however, results in the following response:
{"message":"Missing Authentication Token"}
With this header:
x-amzn-errortype: MissingAuthenticationTokenException
It also had an x-cache
header with the value Error from cloudfront
, so I guess it might have something to do with CloudFront. I haven't set up CloudFront explicitly though, and don't really know how to check?
I think I read every thread on this error message, but none of them seem to apply to me:
- No authorization is required for my method:
- I'm quite sure the URL is correct. When I visit
/periodicals/whatever
(i.e. the{tail+}
resource) in my browser it works fine, but not so for/periodicals
. - CORS is enabled, as both resources are pointing to the same Lambda function which handles CORS and works for the subpath.
- The HTTP verb should not matter, as it's listening for
ANY
. - The result is the same whether I add a trailing slash or not.
- The API is deployed.
- I think the API resource has sufficient permissions on my Lambda function, as I can successfully execute it from the AWS Console:
One interesting observation, thanks to @Lakindu, is that no methods are listed below the resource in the Stages view:
Anything else I can do to find out what's going wrong?
/periodicals
? – Vincent