Hacker News new | ask | show | jobs
by stephengillie 2948 days ago
Is there a way to transfer ownership of an S3 bucket? Like, can I upload a file in my AWS account, and by some means transfer the bucket and files to your AWS account? Without the actual data bits moving and incurring a bandwidth charge? That would be ideal for some scenarios.
2 comments

From the CLI you can copy files to another bucket in another account owned by someone else within the same region without any bandwidth costs. You only pay for the copy requests. The copy request is $.01 per 1000 requests.

You could also create a lambda function that is triggered any time a file is copied with a certain key prefix (like a directory but not really), that copies to the other account. Of course you both have to set up permissions.

https://serverfault.com/questions/349460/how-to-move-files-b...

Use Signed URL feature - the link is valid for set period of time.

docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html

This is a URL that expires, yes? What if I wanted to close my account, but let them retain the bucket and data?
Just one of the ways to share. Or you may set bucket replication to target account, or just aws s3 sync two buckets...
Thanks. Those require 2 buckets, one in each account. The one-bucket solution is elusive.