Skip to content

fix(dynamodb): table v2 arn validation (#38354) - #38384

Open
wasim-builds wants to merge 6 commits into
aws:mainfrom
wasim-builds:fix/issue-38354-dynamodb-table-v2-arn-validation
Open

fix(dynamodb): table v2 arn validation (#38354)#38384
wasim-builds wants to merge 6 commits into
aws:mainfrom
wasim-builds:fix/issue-38354-dynamodb-table-v2-arn-validation

Conversation

@wasim-builds

@wasim-builds wasim-builds commented Jul 23, 2026

Copy link
Copy Markdown

Fixes #38354

Problem

TableV2 ARN validation uses a broad Token.isUnresolved check that rejects partial-tokenized ARNs. This breaks cross-account replica validation when the account/region is still a token during synthesis.

Fix

Remove the blanket Token.isUnresolved guard and allow concrete account/region resolution during replica validation.

Scope

  • packages/aws-cdk-lib/aws-dynamodb/lib/table-v2.ts: relax validation logic
  • packages/aws-cdk-lib/aws-dynamodb/test/table-v2.test.ts: add 15 lines of replica validation tests

Verification

Cross-account table replica creation succeeds when account/region tokens are present but resolvable.

@wasim-builds
wasim-builds requested a review from a team as a code owner July 23, 2026 08:28
@github-actions github-actions Bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. effort/small Small work item – less than a day of effort p1 labels Jul 23, 2026
@aws-cdk-automation
aws-cdk-automation requested a review from a team July 23, 2026 08:28

@aws-cdk-automation aws-cdk-automation left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

@aws-cdk-automation aws-cdk-automation added the pr/needs-further-review PR requires additional review from our team specialists due to the scope or complexity of changes. label Jul 23, 2026
@wasim-builds wasim-builds changed the title fix/issue 38354 dynamodb table v2 arn validation fix(dynamodb): table v2 arn validation (#38354) Jul 23, 2026
@wasim-builds

Copy link
Copy Markdown
Author

Exemption Request: This fixes a bug in cross-account replica table validation for partially tokenized ARNs. No new AWS resources are introduced.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Jul 23, 2026
@wasim-builds
wasim-builds force-pushed the fix/issue-38354-dynamodb-table-v2-arn-validation branch from d047f2c to 945d76d Compare July 23, 2026 14:16
@aws-cdk-automation aws-cdk-automation removed the pr/needs-further-review PR requires additional review from our team specialists due to the scope or complexity of changes. label Jul 23, 2026
@wasim-builds

Copy link
Copy Markdown
Author

Rebased onto latest upstream/main and removed unrelated stacked commits. Only dynamodb-specific changes remain:

  • fix(dynamodb): always parse Table ARN components during TableV2 cross-account validation
  • test(dynamodb): add test for partially tokenized ARN in TableV2MultiAccountReplica

@aws-cdk-automation
aws-cdk-automation dismissed their stale review July 28, 2026 04:02

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@wasim-builds

Copy link
Copy Markdown
Author

Hey 👋 Friendly ping on this one — fixes cross-account replica table ARN validation in DynamoDB TableV2. The change is small and focused. Would appreciate a review when possible! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. effort/small Small work item – less than a day of effort p1 pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(dynamodb): TableV2 validateMultiAccountReplica fails for imported table with tokenized ARN

2 participants