Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(lambda): invalid Version object created from Version.fromVersionA…
…rn (#31433) ### Issue # (if applicable) Closes #29813 ### Reason for this change The current `lambda.Version.fromVersionArn` will incorrectly create the lambda function arn with the version qualifier. This is incorrect behaviour and cause CFN deployment failures. ### Description of changes If the version arn is an unresolved token, use intrinsics to join the first 7 components. Otherwise, split the array and join the first 7 components directly. ### Description of how you validated changes All new and existing tests should pass. New integration tests added with assertions. ### Checklist - [ ] My code adheres to the [CONTRIBUTING GUIDE](https:/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https:/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*
- Loading branch information