aws-cdk-lib/aws-sns-subscriptions: Cannot add Lambda Subscription when Using a Lambda Construct from a SymLinked Construct Library #24788
Labels
@aws-cdk/aws-lambda
Related to AWS Lambda
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
Users can't add a LambdaSubscription to an sns topic using the "addSubscription" method when the created lambda function came from a symlinked construct library.
Expected Behavior
Users can add a LambdaSubscription to an sns topic using the "addSubscription" method regardless of whether it came from a symlinked construct library or not.
Current Behavior
Stack trace:
Reproduction Steps
npm link
a construct library locally that has a lambda function construct.new Topic
addSubscription
method andnew LambdaSubscription
cdk synth
Basic code:
Possible Solution
aws-cdk/packages/@aws-cdk/aws-sns-subscriptions/lib/lambda.ts
Lines 24 to 29 in f3fd183
This guard clause should be:
You can see the commit that mentions this issue in the 'constructs' repository here: aws/constructs@bef8e4d
Additional Information/Context
No response
CDK CLI Version
2.70.0
Framework Version
No response
Node.js Version
16
OS
macOS Monterey Version 12.2
Language
Typescript
Language Version
4.9.4
Other information
No response
The text was updated successfully, but these errors were encountered: