How to find out who uploaded data in Amazon S3 bucket

Hi, everyone; I need to capture the username of the person who uploaded a file to an Amazon S3 bucket. I’ve tried using AWS CloudTrail data events and S3 Event notifications, but the `username` field is not available in the logs.

Any help would be greatly appreciated. Thanks in advance!


Related discussions:

The userIdentity block should at least include the arn of the principal that generated the log event.

You need to enable S3 Server Access Logging or Cloud trail Data Events on the bucket to see object level logs. Assuming the bucket doesn’t allow public putObject, you should see the principal making the call in the logs.

It’s a shame this is being downvoted. Partitioning of objects by key is a useful technique, and the partitions can be chosen depending on business needs.

Of course, it doesn’t help after the fact if no suitable partitioning strategy was in place at the time the object was uploaded.

I mean unless you enable access logging before you needed the information you are SOL.

Are you sure CloudTrail doesn’t have any correlating information? It sees almost everything.