-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sign error #5
Comments
Can you elaborate on what you were trying to do? |
@srirammoorthyziffity I had the same problem, the solution (for me) was to "JSON.stringify" the document I want to save. |
@danieleorler, thanks for pitching in. Could you provide some details on when this problem occurs, so that I can check and fix the code? Thank you. |
@srisub-amzn, I think the code works just fine, I was only using a variation of the function postDocumentToES(doc, context) doc should be a string but I was providing an object, which the signer cannot sign |
I would have assumed what @danieleorler assumed -- that |
I am seeing the same issue even after JSON.stringify doc, please suggest me if anything else need to take care? |
i am getting the below error any idea?
{
"errorMessage": "Not a string or buffer",
"errorType": "TypeError",
"stackTrace": [
"Hash.update (crypto.js:240:17)",
"Object.util.crypto.hash (/var/task/node_modules/aws-sdk/lib/util.js:509:24)",
"Object.sha256 (/var/task/node_modules/aws-sdk/lib/util.js:461:26)",
"V4.hash as hexEncodedHash",
"V4.hexEncodedBodyHash (/var/task/node_modules/aws-sdk/lib/signers/v4.js:195:19)",
"V4.canonicalString (/var/task/node_modules/aws-sdk/lib/signers/v4.js:140:21)",
"V4.stringToSign (/var/task/node_modules/aws-sdk/lib/signers/v4.js:127:41)",
"V4.signature (/var/task/node_modules/aws-sdk/lib/signers/v4.js:109:56)",
"V4.authorization (/var/task/node_modules/aws-sdk/lib/signers/v4.js:86:36)",
"V4.addAuthorization (/var/task/node_modules/aws-sdk/lib/signers/v4.js:36:12)"
]
}
The text was updated successfully, but these errors were encountered: