Define custom url with AWS presigned url #4843
Unanswered
patinside
asked this question in
Migration from v1 to v2
Replies: 2 comments
-
Hi @patinside I'm sorry for the delay. By |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @debora-ito 👋 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am migrating our s3 java API from v1 to v2 version. What I want to do is to generate presigned url. But I want to forge my presigned url because our need is to have a clear url not frightening the user. In our v1 version, we decided to create an url on the format
https://bucket-name/object-key
. then a rule in added in our DNS in order to redirect the request to the AWS server.In order to achieve so, in v1 version, we created a s3Client and override the endpoint configuration with withEndpointConfiguration in order to force the domain to
https://bucket-name
. Then when we instantiate theGeneratePresignedUrlRequest
, we provided an empty string for the bucket. This was working great. With the V2 API, we don't see how to generate such a presigned url. I tried the endpointOverride method on my S3Presigner.builder but in that case I get an url likehttps://bucket-name/bucket-name/object-key
. So the aws server answer iskey does not exist
because the key is understood asbucket-name/object-key
. It is not possible to provide an empty string for the bucket name toGetObjectPresignRequest.builder
because the key is provided via theGetObjectRequest
who must know the bucket name.Beta Was this translation helpful? Give feedback.
All reactions