简体   繁体   English

S3策略仅允许删除用户创建的存储桶

[英]S3 policy that only allows delete for buckets created by the user

I would like to create a policy that allows all S3 actions, but to only delete the buckets and files the user has created itself. 我想创建一个允许所有S3操作的策略,但只删除用户自己创建的存储桶和文件。 Can I define a condition to do so? 我可以定义一个条件吗?

No. There is no concept of a "user that created the bucket". 否。没有“创建存储桶的用户”的概念。

Instead, users request that a bucket be created. 而是,用户请求创建存储桶。 IAM then checks whether they have permission to do this, and the bucket is created on behalf of the account ( not on behalf of the user). 然后,IAM会检查他们是否有权执行此操作,并代表该帐户而不是代表用户)创建存储桶。 Therefore, there is no concept of a user that owns/created the bucket. 因此,不存在拥有/创建存储桶的用户的概念。

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

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