我做了aws configure
并输入了密钥和密钥。我在运行时检查了我的帐户是否存在:
aws iam list-account-aliases
我的别名出现了。
但是,当我尝试将文件上传到aws时,我收到了这个错误:
/Users/kchen/campaiyn-web/node_modules/skipper-s3/node_modules/knox/lib/client.js:197
if (!options.key) throw new Error('aws "key" required');
^
Error: aws "key" required
at new Client (/Users/kchen/campaiyn-web/node_modules/skipper-s3/node_modules/knox/lib/client.js:197:27)
at Function.exports.createClient (/Users/kchen/campaiyn-web/node_modules/skipper-s3/node_modules/knox/lib/client.js:925:10)
at Writable.onFile (/Users/kchen/campaiyn-web/node_modules/skipper-s3/index.js:248:22)
at doWrite (_stream_writable.js:292:12)
at writeOrBuffer (_stream_writable.js:278:5)
at Writable.write (_stream_writable.js:207:11)
at Transform.ondata (_stream_readable.js:528:20)
at emitOne (events.js:77:13)
at Transform.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at Transform.Readable.push (_stream_readable.js:110:10)
at Transform.push (_stream_transform.js:128:32)
at /Users/kchen/campaiyn-web/node_modules/sails/node_modules/skipper/standalone/Upstream/build-renamer-stream.js:49:19
at Object.opts.saveAs (/Users/kchen/campaiyn-web/node_modules/sails/node_modules/skipper/standalone/Upstream/prototype.upload.js:71:7)
at determineBasename (/Users/kchen/campaiyn-web/node_modules/sails/node_modules/skipper/standalone/Upstream/build-renamer-stream.js:32:17)
at Transform.__renamer__._transform (/Users/kchen/campaiyn-web/node_modules/sails/node_modules/skipper/standalone/Upstream/build-renamer-stream.js:40:7)
我觉得我的钥匙安装不正确或我看错了吗?
答案 0 :(得分:0)
您正在使用的库(船长)不知道如何获取凭据。 我建议明确地传递凭证,或者切换到使用明确支持此功能的nodejs AWS SDK。