3
我無法獲得簡單的AWS Node.js EC2示例。這裏是我的代碼:簽名與使用Node.js SDK的AWS不匹配
{ [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 }
爲什麼會出現這個錯誤,我該如何解決這個問題:
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);
}
});
運行時,它看起來像這樣我得到的錯誤?
我在Ubuntu 14.04.1 LTS 64位桌面上使用Node.js v0.10.31。
crossposted這裏:https://forums.aws.amazon.com/thread.jspa?threadID=160122