fix(logs): emit canonical root ARN for ResourcePolicy principals - #38330
Closed
wasim-builds wants to merge 0 commit into
Closed
fix(logs): emit canonical root ARN for ResourcePolicy principals#38330wasim-builds wants to merge 0 commit into
wasim-builds wants to merge 0 commit into
Conversation
aws-cdk-automation
previously requested changes
Jul 16, 2026
This was referenced Jul 16, 2026
Author
|
Exemption Request: The fix handles canonical root ARNs and an integration test may be difficult to assert on or is covered by unit tests. |
aws-cdk-automation
temporarily deployed
to
automation
July 18, 2026 04:34 — with
GitHub Actions
Inactive
aws-cdk-automation
temporarily deployed
to
automation
July 18, 2026 04:34 — with
GitHub Actions
Inactive
aws-cdk-automation
dismissed
their stale review
July 21, 2026 14:16
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Author
|
The unresolved account errors and snapshot issues have been fixed and pushed. |
wasim-builds
temporarily deployed
to
automation
August 10, 2026 12:52 — with
GitHub Actions
Inactive
wasim-builds
temporarily deployed
to
automation
August 10, 2026 12:53 — with
GitHub Actions
Inactive
wasim-builds
force-pushed
the
fix/aws-logs-resource-policy-principal
branch
from
August 10, 2026 12:58
4f34439 to
b5693cb
Compare
wasim-builds
temporarily deployed
to
automation
August 10, 2026 12:58 — with
GitHub Actions
Inactive
wasim-builds
temporarily deployed
to
automation
August 10, 2026 12:58 — with
GitHub Actions
Inactive
Contributor
|
Comments on closed issues and PRs are hard for our team to see. |
Repository owner
temporarily deployed
to
automation
August 10, 2026 12:59 — with
GitHub Actions
Inactive
Repository owner
temporarily deployed
to
automation
August 10, 2026 12:59 — with
GitHub Actions
Inactive
aws-cdk-automation
temporarily deployed
to
automation
August 10, 2026 13:07 — with
GitHub Actions
Inactive
Repository owner
temporarily deployed
to
automation
August 10, 2026 13:27 — with
GitHub Actions
Inactive
Repository owner
temporarily deployed
to
automation
August 10, 2026 13:54 — with
GitHub Actions
Inactive
Repository owner
temporarily deployed
to
automation
August 10, 2026 13:56 — with
GitHub Actions
Inactive
Repository owner
temporarily deployed
to
automation
August 10, 2026 13:58 — with
GitHub Actions
Inactive
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #37797
Problem
convertArnPrincipalToAccountIdemits a bare account ID instead of the canonical root ARN (arn:aws:iam::<account>:root). CloudFormation stores the canonical form, so the mismatch causes permanent false drift onAWS::Logs::ResourcePolicy.Fix
Emit the canonical root ARN from
convertArnPrincipalToAccountId.Scope
packages/aws-cdk-lib/aws-logs/lib/log-group.ts: emit canonical ARNpackages/aws-cdk-lib/aws-logs/test/loggroup.test.ts: update expectationsVerification
CloudFormation drift detection no longer reports false positives for log resource policies.