Assuming the ACLs are correct, should it be possible to copy or move files from one S3 account to another?
I'm doing something like this:
!/usr/bin/env ruby
require 'right_aws'
[... constants defining keys/secrets ...]
b3 = RightAws::S3.new(ONE_AWS_ACCESS_KEY,ONE_AWS_SECRET_KEY)
f3 = RightAws::S3.new(TWO_ACCESS_KEY,TWO_SECRET_KEY)
frombucket = f3.bucket('some-bucket')
tobucket = b3.bucket('other-bucket')
fromfile = RightAws::S3::Key.create(frombucket,'foo.tar')
tofile = RightAws::S3::Key.create(tobucket,'foo.tar')
fromfile.move(tofile)
I'm pretty sure I have the ACLs right, but I still get:
W, [2009-02-20T13:05:12.151800 #8020] WARN -- : ##### RightAws::S3Interface returned an error: 403 Forbidden
<Error><Code>AccessDenied</Code><Message>Access Denied</Message>
...
W, [2009-02-20T13:05:12.152304 #8020] WARN -- : ##### RightAws::S3Interface request: other-bucket.s3.amazonaws.com:443/foo.tar ####
Anyone? Or am I just trying to do something stupid?
|