(aws-scheduler-targets-alpha): Cannot use imported function ARN with LambdaInvoke
target
#29284
Labels
@aws-cdk/aws-lambda
Related to AWS Lambda
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p1
Describe the bug
I'm trying to invoke a "singleton" lambda created in another Stack. I expose the Function ARN via a CloudFormation output. If the lambda function ARN is being imported from a CFN output (e.g.,
Fn.importValue
), even withsameEnvironment: true
, an error is thrown at synth time.Expected Behavior
I expected the validation for the region to be ignored if I use
Lambda.fromFunctionAttributes
with thesameEnvironment
value set totrue
.Current Behavior
I get this error:
Reproduction Steps
Possible Solution
If
sameEnvironment
is set totrue
on the imported lambda, the validations should be skipped.Additional Information/Context
Alpha versions are latest as well
CDK CLI Version
2.130.0 (build bd6e5ee)
Framework Version
No response
Node.js Version
20.x
OS
MacOS
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: