Skip to content

lambda: Function.fromFunctionArn will strip off the trailing version or alias #30002

@pahud

Description

@pahud

Describe the bug

This PR removed the trailing version or alias of the functionArn and is potentially causing breaking changes.

For example,

If Stack A exporting the functionArn like arn:aws:lambda:us-east-1:123456789012:function:ProcessKinesisRecords:live to Stack B and CDK from Stack B importing that with Function.fromFunctionArn, stack B would have the functionArn with the trailing version or alias stripped off, causing the breaking changes.

Expected Behavior

fromFunctionArn() should not remove the trailing version or alias. We probably implement https://github.com/aws/aws-cdk/pull/29820/files with a feature flag.

Current Behavior

fromFunctionArn() would remove the trailing version or alias.

Reproduction Steps

as described above

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.138.0

Framework Version

No response

Node.js Version

all

OS

all

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions