Cross-origin copy fails for Linode Object Storage #3247
-
Hello, We're using I have the bucket named Here is the example code I'm using: from boto3 import client
from boto3.session import Session
sess = Session(
aws_access_key_id='***',
aws_secret_access_key='***'
)
s3_client_src = sess.client(
service_name='s3',
region_name='us-east-1',
endpoint_url='https://us-east-1.linodeobjects.com'
)
# test-bucket and test-object are already exists.
s3_client_trg = sess.client(
service_name='s3',
region_name='us-southeast-1',
endpoint_url='https://us-southeast-1.linodeobjects.com'
)
copy_source = {
'Bucket': 'test-bucket',
'Key': 'test-object'
}
s3_client_trg.copy(CopySource=copy_source, Bucket='test-bucket', Key='test-object', SourceClient=s3_client_src) When I call: s3_client_src.list_objects(Bucket='test-bucket')['Contents'] It shows me that the
Any help is appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 13 replies
-
Hi @AlexanderPodorov thanks for reaching out. I found an issue that mentioned the same error here: #2759 The premium support article mentioned there may help: https://aws.amazon.com/premiumsupport/knowledge-center/404-error-nosuchkey-s3/ But since you’re using Linode, I think the problem may have to do with the endpoint URL as ths customer mentioned in this comment:
|
Beta Was this translation helpful? Give feedback.
-
After some debugging, I've found out that
And one of headers is that:
So it thinks that I want to copy
and that:
Is it possible to specify the source region for bucket/object? |
Beta Was this translation helpful? Give feedback.
-
Closing the discussion. |
Beta Was this translation helpful? Give feedback.
Closing the discussion.