0
我正嘗試將權限授予s3中的現有帳戶。如何將權限遞歸更改爲使用AWS s3或AWS s3api的文件夾
存儲桶歸該帳戶所有,但數據是從另一個帳戶的存儲桶複製的。
當我嘗試給予用命令的權限:
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.
而如果我這樣做對單個文件的命令是成功的。
我該如何讓它適用於完整的文件夾?
'ObjectACL'只支持'files'和'bucket',不支持'folder'。所以你不能爲''文件夾定義ACL。您爲存儲桶級別定義ACL的最簡單解決方案。例如:''Resource「:」arn:aws:s3 ::: BUCKET_NAME/*「' –