Authorization header requires 'Credential' parameter. Authorization header requires 'Signature' parameter

Viewed 3380

I have delivered aws serverless (LAmbda, API GW & DynamoDB), but during the developers test they have faced the following error with their 'Postman' utility:

{

    "message": "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. 
               Authorization=xxxxxxxxxxxxxxxxxxxx"
} 

I have checked the cloudwatch logs but I didn't found anything and I assume that mean the request didn't reached the API endpoint, I don't know why.

Actually, I need to find out whether this error happening because of the Postman parameters or api endpoints.

P.S. Lambda code was developed using Python

Please advise.

3 Answers

The errors are self-explanatory. No they are not. According the API Gateway troubleshooting docs, the error message:

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. Authorization=allow

indicates that the resource path doesn't exist. Check your url and make sure you're accessing the correct endpoint.

I have encountered this error when deployment was done using terraform. For some reason we have to go through AWS console and deploy the API to get rid of this message.

The errors are self-explanatory. How do you authenticate your requests? API Gateway assumes that is through signed request. And signed requests require all these fields.

Beyond that - you really need to give much more information.

Related