aws-lambda: Inconsistent inputDir
Behavior between NodejsFunction
and RustFunction
#34058
Labels
@aws-cdk/aws-lambda
Related to AWS Lambda
@aws-cdk/aws-lambda-nodejs
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
The
inputDir
parameter in AWS CDK function constructs works differently depending on which construct is used:NodejsFunction
, theinputDir
starts from the root of your entire projectRustFunction
, theinputDir
starts from the path of the function source (more intuitive)This inconsistency creates confusion when trying to use the same patterns across different function types in the same project.
Example
When using a
NodejsFunction
:Whereas in
RustFunction
:Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
See above.
Current Behavior
See above.
Reproduction Steps
See above.
Possible Solution
Ideally, the
NodejsFunction
should be updated to match the behavior ofRustFunction
whereinputDir
points to the function source directory rather than the project root.Additional Information/Context
No response
CDK CLI Version
2.187.0
Framework Version
No response
Node.js Version
22.14.0
OS
Ubuntu 24.04
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: