Signing is not AWS compliant using Node.js SDK
I can't seem to get a simple AWS Node.js EC2 example to work. Here's my code:
var AWS = require('aws-sdk');
AWS.config.loadFromPath('./config.json');
new AWS.EC2().describeInstances(function(err, data) {
if (err) {
console.log(err);
} else {
console.log(data);
}
});
The startup error looks like this:
{ [SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.]
message: 'The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.',
code: 'SignatureDoesNotMatch',
time: Wed Sep 03 2014 16:29:37 GMT-0700 (PDT),
statusCode: 403,
retryable: false }
Why am I getting this error and how do I resolve it?
I am using Node.js v0.10.31 on a 64-bit LTS desktop Ubuntu 14.04.1.
Download the complete example here or here .
crossposted here: https://forums.aws.amazon.com/thread.jspa?threadID=160122
+3
source to share