Creating multiple Schedules causes Resolution Error during synth.
This PR does not fix the root cause (discussing at #28713), but apply a workaround to prevent the error.
Description of changes
Use ServicePrincipal with conditions directly, instead of PrincipalWithConditions.
Description of how you validated changes
Added a feature flag {"@aws-cdk/aws-iam:minimizePolicies":true} to unit tests.
Resolution errors occur before fix. No errors occur after fix.
Reason for this change
Creating multiple
Schedule
s causes Resolution Error during synth. This PR does not fix the root cause (discussing at #28713), but apply a workaround to prevent the error.Description of changes
Use
ServicePrincipal
with conditions directly, instead ofPrincipalWithConditions
.Description of how you validated changes
Added a feature flag
{"@aws-cdk/aws-iam:minimizePolicies":true}
to unit tests. Resolution errors occur before fix. No errors occur after fix.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license