Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

unable access s3 service via additional gateway #6134

Unanswered
xtabs12 asked this question in Q&A
Discussion options

Hi AWS SDK team and community 👋,

I'm using software.amazon.awssdk.services.s3.S3Client (SDK v2) with software.amazon.awssdk.http.apache.ApacheHttpClient, but I have a network constraint:

All S3 requests must be routed through a local API Gateway, which requires the request to go to:
example
http://localhost:8080/servicename/<original-s3-path>
The API Gateway strips the /servicename prefix and proxies the request to the actual S3 bucket endpoint.

So my goals are:

Let the AWS SDK generate the correct signature using the real bucket host and S3 path.

i was try it with curl and just generate the signature with AWS S3 endpoint and change header host into AWS S3 endpoint but change the url host for hit into my API Gateway with the path and success to access.

❓ My Questions
Is there a supported or recommended way to intercept and rewrite the final URI (host + path) just before the HTTP request is executed?
Can I safely override the uri of the SdkHttpFullRequest but preserve the original Host header for signature verification?
Will this work reliably with features like multipart uploads or streaming uploads?

Any insights or guidance on how to solve this kind of endpoint rewrite with S3 and SDK v2 would be really helpful.

Thanks!

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /