Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to transfer ownership of objects to another user using the Amazon S3?

Tags:

amazon-s3

If I have objects stored in the Amazon S3, is it possible to transfer ownership of an object to another user?

like image 669
Cory Avatar asked Jul 09 '10 13:07

Cory


2 Answers

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.

like image 161
p7r Avatar answered Oct 12 '22 05:10

p7r


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.

like image 32
jarmod Avatar answered Oct 12 '22 05:10

jarmod