javascript - AWS与nodejs失败,错误BucketAlreadyOwnedByYou

标签 javascript node.js amazon-web-services amazon-s3

我使用这个npm https://github.com/RiptideElements/s3fs并得到这个错误

Unhandled rejection BucketAlreadyOwnedByYou: Your previous request to create the
 named bucket succeeded and you already own it.

在我的 app.js 中我这样做

var s3 = require('./config/db.js');
var fs = require('fs');
var S3FS = require('s3fs');

var s3_config = require('./config/s3_config');
var s3fsImpl = new S3FS(s3_config.bucket,{
  accessKeyId : s3_config.key,
  secretAccessKey : s3_config.secret
});
s3fsImpl.create();

有什么想法或提示我为什么会收到错误吗?

最佳答案

来自the documentation :

s3fs.create(options[, callback])

Creates a new bucket on S3.

您似乎正在调用该方法来创建新的 S3 存储桶。该存储桶是否已经存在?

关于javascript - AWS与nodejs失败,错误BucketAlreadyOwnedByYou,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34603421/

相关文章:

javascript - React 组件在状态更改后不会重新呈现

php - 在以下情况下,我是否需要清理 Javascript?

javascript - 如果在某些网页上运行脚本

node.js - nodejs,获取操作系统的语言环境

arrays - 使用 mongoose 在 mongodb 中保存多个字段数组

web-services - 自动创建的EC2实例以及如何删除(终止)它?

amazon-web-services - AWS Cloud9 卡住连接

javascript - html中的隐藏文本框

node.js - Angularjs 全栈测试

hadoop - 覆盖hadoop