由所有者列出S3内容

时间:2022-06-24 10:46:20

Is it possible to list the contents of an S3 bucket for a particular owner? I have a very large number of files with the wrong owner and need to update them to the correct owner in the most efficient way possible.

是否可以列出特定所有者的S3存储桶的内容?我有大量错误所有者的文件,需要以最有效的方式将它们更新为正确的所有者。

Thx

谢谢

1 个解决方案

#1


1  

Of course you can. E.g. with the following AWS CLI command:

当然可以。例如。使用以下AWS CLI命令:

aws s3api list-objects-v2 --bucket your-bucket --fetch-owner \
                          --query "Contents[?Owner.ID=='your-owner']"

#1


1  

Of course you can. E.g. with the following AWS CLI command:

当然可以。例如。使用以下AWS CLI命令:

aws s3api list-objects-v2 --bucket your-bucket --fetch-owner \
                          --query "Contents[?Owner.ID=='your-owner']"