-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Using CNAME with pre-signed url [aws-java-sdk-s3] #1498
Comments
Try to following configuration for s3 client:
You can try asking this question in stack overflow or AWS forums where other developers might have already solved a similar problem. |
@varunnvs92 thanks for the response! I've tried what you'd suggested:
Please note that I omit bucket name during pre-signed url generation. The generated url now looks like: The Thanks a lot! Will close the issue. |
@evredinka don't you get a |
Hi!
I'm trying to find a way how I can use cname when creating presigned url with java sdk. I am using version
1.11.18
.So far I have:
The code above generates url like:
https://my.bucket.com.s3.eu-central-1.amazonaws.com/test.xml?{query...}
I have configured CNAME
my.bucket.com
that is resolved tomy.bucket.com.s3.eu-central-1.amazonaws.com
The configuration is correct as I am able to access file with
http://my.bucket.com/test.xml
Anyway I can't generate pre-signed url that can be accessible using
https://my.bucket.com/test.xml?{query...}
I've tried to set endpoint like this:
but with no success, as returned url now looks like
https://my.bucket.com.my.bucket.com/test.xml?{query...}us-east-1
The bucket name is duplicated and the region in query params is different
And this:
I got url like:
https://my.bucket.com.s3.eu-central-1.amazonaws.com/test.xml?{query...}eu-central-1
In case I use this url with cname like
https://my.bucket.com/test.xml?{query...}eu-central-1
I receiveThe request signature we calculated does not match the signature you provided
I wonder if there is a possible way to use CNAME with presigned url.
Thanks.
The text was updated successfully, but these errors were encountered: