'Authorization header requires 'Credential' parameter. Authorization header requires 'Signature' parameter
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.
Solution 1:[1]
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.
Solution 2:[2]
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.
Solution 3:[3]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | JesusGuzmanJr |
Solution 2 | Felix |
Solution 3 | skimad |