Reputation: 6809
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.
Thx
Upvotes: 1
Views: 1334
Reputation: 8435
Of course you can. E.g. with the following AWS CLI command:
aws s3api list-objects-v2 --bucket your-bucket --fetch-owner \
--query "Contents[?Owner.ID=='your-owner']"
Upvotes: 5