【发布时间】:2014-12-03 14:00:40
【问题描述】:
AWS.config.loadFromPath('./AwsConfig.json');
var params = {
Bucket: 'test-dev-2',
Key: file,
Body: data
};
s3.putObject(params, function(err) {
if(err) {
console.log(err);
}
else {
console.log("Success");
}
我已经在我的 AwsConfig.json 文件中设置了凭据,并且控制台返回了此错误:
{ [TimeoutError: Missing credentials in config]
message: 'Missing credentials in config',
code: 'CredentialsError',
time: Wed Oct 08 2014 16:05:18 GMT-0300 (BRT),
originalError:
{ message: 'Could not load credentials from any providers',
code: 'CredentialsError',
time: Wed Oct 08 2014 16:05:18 GMT-0300 (BRT),
originalError:
{ message: 'Connection timed out after 1000ms',
code: 'TimeoutError',
time: Wed Oct 08 2014 16:05:18 GMT-0300 (BRT) } } }
凭据没有错。。有人知道为什么会出错吗?
【问题讨论】:
-
遇到同样的问题,但时断时续。你解决了吗?
标签: json node.js amazon-web-services amazon-s3 amazon