Migrate AWS SDK v1 anonymous and EC2/container credentials

Apache 2.0

v2-migration has no mapping for AnonymousAWSCredentials or EC2ContainerCredentialsProviderWrapper. new AWSStaticCredentialsProvider(new AnonymousAWSCredentials()) becomes AnonymousCredentialsProvider.create(), and the wrapper becomes a chain of ContainerCredentialsProvider and InstanceProfileCredentialsProvider, which resolves the same source the wrapper selected from the container environment variables.

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

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