【问题标题】:s4cmd sync two buckets access denieds4cmd 同步两个存储桶访问被拒绝
【发布时间】:2016-07-19 20:32:48
【问题描述】:

我正在尝试同步两个 s3 存储桶:

s4cmd --dry-run sync s3://cgl-rnaseq-recompute-fixed/gtex s3://rnaseq.toil.20k/gtex

但我收到以下错误:

[Exception] An error occurred (AccessDenied) when calling the ListObjects operation: Access Denied
[Thread Failure] An error occurred (AccessDenied) when calling the ListObjects operation: Access Denied

源存储桶是公开可用的。第二个桶是我的,我可以访问它:

[centos@ip-172-30-3-12 data]$ s4cmd ls s3://rnaseq.toil.20k/
                 DIR s3://rnaseq.toil.20k/gtex/
                 DIR s3://rnaseq.toil.20k/pnoc/
                 DIR s3://rnaseq.toil.20k/target/
                 DIR s3://rnaseq.toil.20k/tcga/

我也不能在源存储桶上使用s4cmd ls,但我可以使用s3cmd

[centos@ip-172-30-3-12 data]$ s4cmd ls s3://cgl-rnaseq-recompute-fixed/gtex
[Exception] An error occurred (AccessDenied) when calling the ListObjects operation: Access Denied
[Thread Failure] An error occurred (AccessDenied) when calling the ListObjects operation: Access Denied

[centos@ip-172-30-3-12 data]$ s3cmd ls --requester-pays s3://cgl-rnaseq-recompute-fixed/gtex
                       DIR   s3://cgl-rnaseq-recompute-fixed/gtex/
2016-06-03 17:02    435553   s3://cgl-rnaseq-recompute-fixed/gtex-manifest

可能出了什么问题?任何建议将不胜感激。

【问题讨论】:

  • 你在哪里运行那个命令?
  • 在 EC2 实例上。
  • 您说您有权访问该存储桶?您能否粘贴您的帐户对 S3 的政策?
  • 我不知道该怎么做。 (不知道这是否重要,但我不是管理员)。但我在我的问题中表明我可以通过 s3cmd ls 访问这两个存储桶。
  • 您能否转到您有权访问的存储桶并从 AWS 控制台查看其内容?

标签: amazon-web-services s3cmd


【解决方案1】:

要实现 s3cmd 行为,请使用通配符:

s4cmd sync s3://bucket/path/dirA/* s3://bucket/path/dirB/

注意 s4cmd 不支持没有尾随斜杠的 dirA,表明 dirA/* 是 rsync 支持的。

所以在你的情况下你必须使用。

s4cmd --dry-run sync s3://cgl-rnaseq-recompute-fixed/gtex/* s3://rnaseq.toil.20k/gtex

查看此文档以了解 s4cmd,它非常有帮助。

https://github.com/bloomreach/s4cmd

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-02-03
    • 1970-01-01
    • 2020-04-01
    • 2018-01-10
    • 1970-01-01
    • 2017-02-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多