DianaIonita/serverless-api-gateway-caching

Internal Server Error when setting cache key parameter request.header.Authorization

Closed this issue · 2 comments

I have the following in serverless.yml:

GET method that uses Lambda Proxy Integration:

        caching:
            enabled: true
            cacheKeyParameters:
              - name: request.header.Authorization
GET /api-path
Headers:
  Authorization: Bearer <token>

However, this always yields no results due to Internal Server Error when there should be results.
By removing the caching for the method, it works fine.

I am using a custom Token-based lambda authorizer. The token source is "Authorization". Not sure if that makes a difference?

Here's the error I see from X-Ray trace:

Error 403: Execution failed due to configuration error: The request signature we calculated does not match the signature you provided.

Any ideas?

Hi @eggboy0,

Thanks for reporting the issue. Please use the previous version 1.7.5 for now while I work on a fix. I will let you know when sorted.

Hi @eggboy0,

I just released v1.8.1 which should fix your problem. Please reopen the issue if that's not the case.