-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot access Alibaba Cloud OSS via AmazonS3 #3827
Comments
As documented with_url only supports specific URL types - https://docs.rs/object_store/latest/object_store/aws/struct.AmazonS3Builder.html#method.with_url Could you try using the lower-level methods such as https://docs.rs/object_store/latest/object_store/aws/struct.AmazonS3Builder.html#method.with_endpoint |
Thanks, AmazonS3Builder::new()
.with_virtual_hosted_style_request(true)
// region is not used when virtual_hosted_style is true,
// but is required, so dummy is used here
.with_region("dummy")
.with_access_key_id(key_id)
.with_secret_access_key(key_secret)
.with_endpoint(endpoint)
.with_bucket_name(bucket)
.with_client_options(cli_opt)
.with_retry(retry_config)
.build() There is only one issue left for me. See snippet above, |
The region code is a requirement for AWS request signing - https://docs.aws.amazon.com/general/latest/gr/signing-elements.html It must be that Alibaba Cloud OSS is agnostic to what the actual region is set to, the docs don't appear to be very clear... |
The region is set in endpoint. |
The region as set on the builder is what gets passed to From what you have indicated, it would appear Alibaba Cloud OSS currently is not enforcing that the signature matches the region of the endpoint, but I'm somewhat loathe to assume this will always be the case? |
I'm closing this as I don't believe this is tracking anything anymore. Feel free to reopen if I'm mistaken |
Describe the bug
I use AmazonS3 to access OSS like this:
endpoint
ishttps://oss-cn-hangzhou.aliyuncs.com
, this build failed with following error:This is a demo for using Python to access OSS via S3 client in https://www.alibabacloud.com/help/en/object-storage-service/latest/use-aws-s3-sdk-to-access-oss#section-jmf-a67-hat
I think there is something wrong in current S3 client implementation.
To Reproduce
See above
Expected behavior
Additional context
Build successfully.
The text was updated successfully, but these errors were encountered: