Reputation: 259
If I have objects stored in the Amazon S3, is it possible to transfer ownership of an object to another user?
Upvotes: 12
Views: 18469
Reputation: 78803
The owner of an S3 object can be changed from the uploader to the bucket owner, if the bucket owner has full control over the object.
The uploader can optionally indicate an ACL of bucket-owner-full-control
when uploading the object. The bucket owner can also create a bucket policy that rejects uploads to the bucket that do not supply an ACL of bucket-owner-full-control
.
Enforcing bucket-owner-full-control
on uploads is generally considered a good practice, to avoid the scenario where a bucket owner has no control over objects uploaded by a third party (other than to delete them, which is always possible given that you are the bucket owner and payer).
Once the bucket owner has full control of an object, and despite the fact that the object is still owned by the uploader, the bucket owner can now take ownership by copying the object over itself.
Also, as of October 2020, S3 now enables bucket owners to automatically assume ownership of objects uploaded to their buckets.
Upvotes: 3
Reputation: 7200
It depends on what you mean by owner:
The person who runs the S3 account - the highest level - can always see all files, and the only way to transfer them to another account is to download the file somewhere, like EC2 and then re-upload it. I think that this is what you mean.
There are all sorts of permissions in AWS - you can use IAM to create and edit users, ACLs to modify permissions, and what not to dictate who can see what, and you don't have to download or anything - but all these users are always subordinate to the highest level person in charge of the account.
Upvotes: -4
Reputation: 444
From http://docs.amazonwebservices.com/AmazonS3/index.html?S3_ACLs.html
Every bucket and object in Amazon S3 has an owner, the user that created the bucket or object. The owner of a bucket or object cannot be changed. However, if the object is overwritten by another user (deleted and rewritten), the new object will have a new owner.
So, no, but you could give write access via the ACL to another user who could read it, delete it and write it back, that user would become the owner.
Upvotes: 17