API Gateway HTTP API Authorizer Caching 500 Errors

This is not a bug but limitation on API Gateway handling caching, the behavior you’re experiencing with API Gateway caching 500 errors from a Lambda authorizer is a recognized limitation when utilizing authorization caching. API Gateway indiscriminately caches all responses from the authorizer, including error responses, which may result in the issue you’ve observed.

Please consider:

  • Return 401 or 403 instead of 500
  • Disable Caching Temporarily
  • Reduce Cache TTL
  • Custom your own Error handling

Read more here: Source link