-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(iam): duplicate PolicyStatements lead to too many overflow policies
Historically, policy statement deduplicating was done during policy rendering. There could be a 100 statements in a policy, but if they were all the same it would only render as 1 statement. When we introduced policy splitting, those 100 equal statements would *first* be divided into Overflow policies before being deduplicated (potentially leading to too many policies being created, hitting limits). Especially CDK Pipelines takes heavy advantage of the deduplicating behavior, and adds the same policies over and over again, leading to overflows. When the `minimizePolicies` feature flag is turned on, duplicate elimitation is implicitly performed (because equal statements count as mergeable), but when the feature flag is off we hit the bad behavior. As a fix, do deduplication even if merging is turned off.
- Loading branch information
Showing
3 changed files
with
98 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters