繁体   English   中英

AWS S3上载到其他帐户中的存储桶并授予该帐户所有权?

[英]AWS S3 upload to a bucket in a different account and give ownership to that account?

我已将源(和目标)帐户s3:*授予存储桶和存储桶/ *的权限

我可以将文件上传到目标帐户的存储桶。 但是它没有权限到达,目标帐户所有者无法读取它。

此外,源帐户无法删除它。 (目标帐户可以删除它,但不能读取它)

[root@ip-10-66-2-209 ~]# aws s3 cp nohup.out s3://ji-rhel
upload: ./nohup.out to s3://ji-rhel/nohup.out                
[root@ip-10-66-2-209 ~]# aws s3 rm s3://ji-rhel/nohup.out
delete failed: s3://ji-rhel/nohup.out An error occurred (AccessDenied) when calling the DeleteObject operation: Access Denied

所以我试图添加各种ACL语句:

[root@ip-10-66-2-209 ~]# aws s3 cp nohup.out s3://ji-rhel --acl public-read-write
upload failed: ./nohup.out to s3://ji-rhel/nohup.out An error occurred (AccessDenied) when calling the CreateMultipartUpload operation: Access Denied

与“ --acl bucket-owner-full-control”相同的多部分错误。 如果上传较小的文件,则在PutObject上会收到相同的错误。

我对存储区/ *授予了源帐户额外的“ s3:ObjectOwnerOverrideToBucketOwner”权限。

我尝试上传文件,然后从目标帐户的控制台更改权限。

Access denied  (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: C703B5....

任何人对如何进行跨帐户上传以及任何人/任何人都可以读取的文件有任何想法吗?

将对象复制到其他帐户拥有的存储桶时,请使用:-- --acl bucket-owner-full-control

这将确保接收桶“拥有”对象。

咄。 我只是认为这是实例角色,不允许完全S3访问,而不是存储桶策略。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM