Migrate AWS SDK v1 IAM policy builder to iam-policy-builder

Apache 2.0

Converts com.amazonaws.auth.policy statements and policies built with new Statement(Effect), withActions(S3Actions.X), withResources(new Resource(arn)), withId and new Policy().withStatements(..) to v2's IamStatement/IamPolicy builders, which serialize the same policy with toJson(). Principals, Conditions and ConditionFactory conditions become addPrincipal/addCondition with the same type, key and value strings, and every v1 action enum becomes its action name.

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

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