Skip to content

Conversation

@christophercurrie
Copy link
Contributor

Reason for this change

The ServerlessCache construct casts the underlying resource endpoint port to a number using the javascript Number constructor, which isn't properly handled when using the value in other resources.

Description of changes

The fix is to instead use Token.asNumber which properly registers the token and tracks dependencies.

Description of how you validated changes

Added a unit test to verify the value across stacks.

Checklist

  • My code adheres to the CONTRIBUTING GUIDE
  • My pull request adheres to the Pull Request Rule
    • Do not omit the aws- part in the scope of the PR title if the PR relates to a specific AWS service module.
    • e.g.) feat(aws-s3): description of the change

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

Copy link
Contributor

@go-to-k go-to-k left a comment

Choose a reason for hiding this comment

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

Thanks for your PR.

@go-to-k go-to-k added this pull request to the merge queue Oct 14, 2025
Merged via the queue into open-constructs:main with commit 57858e7 Oct 14, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants