1 Answer
- Newest
- Most votes
- Most comments
0
I am not sure about the URI format, but a few things to try to get started:
- Can you look at the 400 response body? Sometimes the response error body has useful information that can point in the right direction. Try pulling the URL up in a browser.
- The Error from CloudFront means the request is probably malformed, which might align with your theory on the uri format. If it was an issue with the Lambda logic you would likely get a 502 and the x-cache header would be LambdaValidationError or LambdaExecutionError.
- Is there anything meaningful in the CloudWatch logs that might point you in the right direction?
- Consider logging the event object at the end of your L@E function. I am not sure which language you are using, but for node I usually do something like the following. You should see the output in the CloudWatch logs which might point to the issue. Start by checking the event.request.origin object to see if everything looks correct there.
console.log(JSON.stringify(event));
answered 2 years ago
Relevant content
- asked 3 months ago
- Accepted Answerasked 7 months ago
- asked 2 days ago
- asked 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago