Access POST Request body from Custom Authorizer Lambda Function

If you need to implement a signature-based authorizer, you can use a Lambda@Edge. It works with cloud front and you can intercept events in viewer request, origin request, origin response and viewer response.

Fields received: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html#request-event-fields-request

Be aware of the body size limitations, the body will be truncated if it exceeds the size limit. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-requirements-limits.html#lambda-at-the-edge-body-size-limits-lambda-at-edge


Per this answer to a similar question, it does not seem the body is provided to custom authorizers. Documentation here does not list a body parameter. I think perhaps the thinking is that the authorizer should rely on the route and headers rather than getting into the application-level body data.