Skip to content

Conversation

@pedrolourencoribeiro
Copy link

@pedrolourencoribeiro pedrolourencoribeiro commented Oct 8, 2025

Description

This PR adds support for the Arn attribute of AWS::DynamoDB::GlobalTable and AWS::Lambda::Url resources in CDK hotswap deployments.

Changes Made

  • Added AWS::DynamoDB::GlobalTable to RESOURCE_TYPE_ATTRIBUTES_FORMATS in evaluate-cloudformation-template.ts
  • Added AWS::Lambda::Url to RESOURCE_TYPE_ATTRIBUTES_FORMATS in evaluate-cloudformation-template.ts
  • Added comprehensive test cases in state-machine-hotswap-deployments.test.ts to verify both functionalities
  • Both resources use the same stdSlashResourceArnFmt function for consistent ARN formatting

Testing

  • ✅ All existing hotswap tests pass
  • ✅ New test cases verify both GlobalTable and Lambda URL Arn attributes work correctly
  • ✅ No regressions detected

Fixes

Fixes #35688

Example

Before this fix, using cdk watch with stacks containing DynamoDB GlobalTable or Lambda URL resources would fail with:

We don't support attributes of the 'AWS::DynamoDB::GlobalTable' resource. This is a CDK limitation.
We don't support attributes of the 'AWS::Lambda::Url' resource. This is a CDK limitation.

After this fix, cdk watch works correctly with both resource types.

…::Lambda::Url Arn attributes

- Add AWS::DynamoDB::GlobalTable to RESOURCE_TYPE_ATTRIBUTES_FORMATS
- Add AWS::Lambda::Url to RESOURCE_TYPE_ATTRIBUTES_FORMATS
- Add comprehensive test cases for both GlobalTable and Lambda URL Arn attributes in hotswap
- Fixes issue where cdk watch would fail with unsupported resource attributes

Fixes #35688
@mrgrain
Copy link
Contributor

mrgrain commented Jan 12, 2026

@pedrolourencoribeiro Apologies for the delay. We cannot move forward with this unless you include the required contributor statement in you PR description:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.71%. Comparing base (a01536f) to head (81e1008).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #911      +/-   ##
==========================================
- Coverage   87.75%   87.71%   -0.04%     
==========================================
  Files          72       72              
  Lines       10077    10077              
  Branches     1327     1327              
==========================================
- Hits         8843     8839       -4     
- Misses       1209     1213       +4     
  Partials       25       25              
Flag Coverage Δ
suite.unit 87.71% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(hotswap): We don't support attributes of the 'AWS::DynamoDB::GlobalTable' resource.

3 participants