Hi there,
I have a question regarding Authorization functions. I have to methods both using the same lambda function as Authorizer. the GET method works fine, but the POST method doesn’t.
Here is the error:
"Authorization header requires 'Credential' parameter. Authorization header requires 'Signature' parameter. Authorization header requires 'SignedHeaders' parameter. Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header
Any idea why this two methods work differently? Thanks
YML Structure:
authorizerFunc:
handler: auth/handler.authorizerFunc
items-base:
handler: api/items/handler-list.get
events:
- http:
method: get
path: api/items
integration: lambda
authorizer:
name: authorizerFunc
identitySource: method.request.header.Authorization
items-create:
handler: api/items/handler-create.post
events:
- http:
method: post
path: api/items/create
integration: lambda
authorizer:
name: authorizerFunc
identitySource: method.request.header.Authorization