删除桶策略

您可以使用 deleteBucketPolicy接口刪除桶策略,以下代码展示如何刪除一个策略桶,该模块将获取单个命令行参数,指定需要删除其策略的存储桶 :

var bucketParams = {
    Bucket: process.argv[2]
};
// call s3Client to delete policy for selected bucket
s3Client.deleteBucketPolicy(bucketParams, function(err, data) {
  if (err) {
    console.log("Error", err);
  } else if (data) {
    console.log("Success", data);
  }
});