Migrate AWS SDK v1 Region, RegionUtils and DefaultAwsRegionProviderChain
Apache 2.0v2-migration maps only the Regions enum. This maps v1 Region and RegionUtils.getRegion(name) to v2 Region/Region.of(name), Region.getRegion(Regions.X) to the enum constant, getName() to id(), and v1 DefaultAwsRegionProviderChain to v2's, whose getRegion() returns a Region, so .id() keeps the String. Both chains read the environment, system properties, profile and instance metadata, and both throw when no region is found. Other Region/RegionUtils methods and Regions.getCurrentRegion() are marked.
org. openrewrite. aws. sdk. MigrateAwsRegionResidualsmod run . --recipe= org. openrewrite. aws. sdk. MigrateAwsRegionResidualsInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.