我正在尝试向s3中的一个现有帐户授予权限。
存储桶由帐户拥有,但数据是从另一个帐户的桶中复制的。
当我尝试使用命令授予权限时:
aws s3api put-object-acl --bucket <bucket_name> --key <folder_name> --profile <original_account_profile> --grant-full-control emailaddress=<destination_account_email>我收到错误:
An error occurred (NoSuchKey) when calling the PutObjectAcl operation: The specified key does not exist.如果我在一个文件上执行这个操作,则命令是成功的。
我如何使它对一个完整的文件夹工作?
发布于 2019-07-31 20:56:04
这是我唯一的powershell解决方案。
aws s3 ls s3://BUCKET/ --recursive | %{ "aws s3api put-object-acl --bucket BUCKET --key "+$_.ToString().substring(30)+" --acl bucket-owner-full-control" }
https://stackoverflow.com/questions/46572744
复制相似问题