Skip to content
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

Open
srirammoorthyziffity opened this issue Dec 31, 2015 · 6 comments
Open

Sign error #5

srirammoorthyziffity opened this issue Dec 31, 2015 · 6 comments

Comments

@srirammoorthyziffity
Copy link

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)"
]
}

@srisub-amzn
Copy link
Contributor

Can you elaborate on what you were trying to do?
And, is this during ingestion from Kinesis or from S3?

@danieleorler
Copy link

@srirammoorthyziffity I had the same problem, the solution (for me) was to "JSON.stringify" the document I want to save.

@srisub-amzn
Copy link
Contributor

@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.

@danieleorler
Copy link

@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

@thesmart
Copy link

thesmart commented Apr 15, 2016

I would have assumed what @danieleorler assumed -- that AWS.HttpRequest would take an Object and not a json String. Reading this saved me some time.

@anjushetty
Copy link

I am seeing the same issue even after JSON.stringify doc, please suggest me if anything else need to take care?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants