fix(iam): paginate inline-policy listings#2006
Merged
Merged
Conversation
These inline-policy listings hardcoded IsTruncated=false and ignored Marker / MaxItems, so a boto3 paginator treated page 1 as the complete set. Add a shared paginate_policy_names helper (sorted, cursor = policy name, MaxItems-bounded) and render IsTruncated + Marker across all three handlers. Test: three inline policies on a role, MaxItems=1 pages through all three with a marker, each exactly once.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
2026-06-27 bug-hunt Tier 1 finding 1.19 (IAM, final item).
ListRolePolicies/ListUserPolicies/ListGroupPolicieshardcodedIsTruncated=falseand ignoredMarker/MaxItems, so a boto3 paginator treated page 1 as complete. Add a sharedpaginate_policy_nameshelper (sorted, cursor = policy name, MaxItems-bounded) and renderIsTruncated+Markeracross all three handlers.Test: three inline policies on a role;
MaxItems=1pages through all three with a marker, each exactly once. IAM unit + e2e green.Summary by cubic
Fix pagination for IAM inline policy listings so SDK paginators work correctly.
ListRolePolicies,ListUserPolicies, andListGroupPoliciesnow honorMaxItems/Markerand return properIsTruncatedandMarker.paginate_policy_nameshelper (sorted by name; name-based cursor;MaxItems-bounded).IsTruncated=falseand emitIsTruncated+Markerin the XML.MaxItems=1pagination across three inline policies.Written for commit 85520c4. Summary will update on new commits.