-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws_lambda: Version.fromVersionArn creates invalid Version object #29813
Comments
Yes, it should be a tiny fix here
|
…29820) ### Issue # (if applicable) Closes #29813 ### Reason for this change improve the fromFunctionArn() to better handle the input ARN ### Description of changes fromFunctionArn() does not handle the ARN correctly if the input ARN has trailing version or alias. ### Description of how you validated changes See unit tests ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Re opening this issue since the PR that fixed this was reverted |
Comments on closed issues and PRs are hard for our team to see. |
1 similar comment
Comments on closed issues and PRs are hard for our team to see. |
Describe the bug
The version object created by Version.fromVersionArn is created with a lambda property that still contains the version qualifier in its function url. Which can cause CloudFormation deployment errors. For example when you create a lambda alias from it and then try to use that alias fro a lambda function url.
Expected Behavior
I expect Version.fromVersionArn to create the equivalent object as Version.fromVersionAttributes when referencing the same version.
The following test when using Version.fromVersionAttributes succeeds:
Current Behavior
However the following test when using Version.fromVersionArn fails because the version qualifier is not stripped from the arn:
Reproduction Steps
Run the above tests
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.137.0
Framework Version
No response
Node.js Version
v20.11.0
OS
macOS Sonoma 14.4.1
Language
TypeScript
Language Version
Typescript (5.4.5)
Other information
No response
The text was updated successfully, but these errors were encountered: