I have two s3 buckets, take "srcs3bck" and "dsts3bck", i have a text file in srcs3bck. I tried the answer suggested in StackOverFlow question to copy the source to destination. But when i do i am getting 404 response error, stating my source bucket is not available.
But i tried to get bucket and get all kes. It is displaying the key.
>>> import boto
>>> conn=boto.connect(<credentials>)
>>> src = conn.get_bucket("srcs3bck")
>>> src.get_all_keys()
printing my key list properly.
>>> dst = conn.get_bucket("dsts3bck")
>>>
>>> src.get_all_keys()
[<Key: srcs3bck,Test2.txt>]
>>>
>>> src.list()
<boto.s3.bucketlistresultset.BucketListResultSet object at 0x03768310>
>>> x=src.list()
>>> for i in x: print i
<Key: srcs3bck,Test2.txt>
>>> for i in x: print i.key
Test2.txt
>>> for i in x: dst.copy_key(i.key,src,i.key)
.......
ignoring other lines
....
S3ResponseError: S3ResponseError: 404 Not Found
<Error><Code>NoSuchBucket</Code><Message>The specified bucket does not exist</Message><BucketName><Bucket: srcs3bck></BucketName><RequestId>358C4C2420BB91E9</RequestId><HostId>ws6wagGIZqquStqisfGuYHeMMscmmR2Iu8LL4jCv9KpLBzxieiryI/mRwxwz4aQ=</HostId></Error>
>>>
What else i need to change on this. I am not sure of what mistake i am doing. Could anyone help me resolving this. Thanks in advance