Skip to content

Migrate to v2 of the AWS Java SDK for S3 #27969

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

JamieB-gu
Copy link
Contributor

This is partial, it only updates one usage of S3. Before this can be merged all usages should be updated, so opening as draft for now.

Paired with @rtyley

Changes so far

Panda

Panda settings require an instance of an S3BucketLoader. Panda comes with a default implementation for v1, but not v2, so this change creates one.

This first requires a synchronous S3 client, which has been added to the AWSv2 object alongside the existing asynchronous S3 client. Creating it here, rather than in the controller as before, allows it to be used more widely.

Then the getObject method can be applied, with a ResponseTransformer to retrieve the "content" of the response, i.e. the object itself.

@JamieB-gu JamieB-gu linked an issue May 13, 2025 that may be closed by this pull request
@rtyley rtyley force-pushed the aws-sdk-v2-s3 branch 5 times, most recently from 00d1172 to 6cb6fa5 Compare May 20, 2025 16:00
The first part of the S3 migration.

Panda settings require an instance of an `S3BucketLoader`. Panda comes
with a default implementation for v1, but not v2, so this change creates
one.

This first requires a synchronous S3 client, which has been added to the
`AWSv2` object alongside the existing asynchronous S3 client. Creating
it here, rather than in the controller as before, allows it to be used
more widely.

Then the `getObject` method can be applied, with a `ResponseTransformer`
to retrieve the "content" of the response, i.e. the object itself.

We're removing `S3Client` as it became unused with
#27391

Co-authored-by: Roberto Tyley <[email protected]>
Copy link
Contributor

github-actions bot commented May 20, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AWS-SDK v2: S3
2 participants