Migrate code written against the AWS SDK v1 AwsClientBuilder base type

Apache 2.0

Runs before software.amazon.awssdk.v2migration.AwsSdkJavaV1ToV2. Where a client builder is handled as v1's AwsClientBuilder (typically a generic <T extends AwsClientBuilder<?, ?>> helper), the type becomes v2's AwsClientBuilder, and setEndpointConfiguration(new EndpointConfiguration(endpoint, region)), setRegion(String) and setCredentials statements, and their with forms, become endpointOverride, region and credentialsProvider. Concrete client builder chains in the same file are converted to v2 along with it.

org.openrewrite.aws.sdk.MigrateGenericAwsClientBuilders
mod run . --recipe=org.openrewrite.aws.sdk.MigrateGenericAwsClientBuilders

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.