尝试对参数进行硬编码,看看是否再次出现错误:
AWS.config.update({ accessKeyId: "YOURKEY", secretAccessKey: "YOURSECRET", "region": "sa-east-1" <- If you want send something to your bucket, you need take off this settings, because the S3 are global. }); // for simplicity. In prod, use loadConfigFromFile, or env variablesvar s3 = new AWS.S3();var params = { Bucket: 'makersquest', Key: 'mykey.txt', Body: "HelloWorld"};s3.putObject(params, function (err, res) { if (perr) { console.log("Error uploading data: ", err); } else { console.log("Successfully uploaded data to myBucket/myKey"); }});这里的好资源



