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
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.

1 participant