Migrate S3 v1 calls that AWS's v2 migration does not handle
Apache 2.0Runs before software.amazon.awssdk.v2migration.AwsSdkJavaV1ToV2 and converts S3 calls it would leave broken: doesObjectExist/doesBucketExist[V2] through a generated S3Compat that copies v1's logic, generatePresignedUrl(GeneratePresignedUrlRequest) to S3Presigner through a generated S3PresignerHolder, CannedAccessControlList to ObjectCannedACL/BucketCannedACL, or to v1's header string where v2 has no constant, listNextBatchOfObjects loops to a paginator and TransferManager to S3TransferManager with the S3AsyncClient it requires. POST and PATCH URLs, which S3Presigner cannot produce, are signed with SigV4 query parameters as v1 did.
org. openrewrite. aws. sdk. MigrateS3ResidualsOptional
Whether to generate the helper classes that the changes use. Compositions that limit where helpers are generated set it to false and generate them with org.openrewrite.aws.sdk.GenerateAwsSdkV2Helpers. Defaults to true.
mod run . --recipe= org. openrewrite. aws. sdk. MigrateS3ResidualsInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.