aws_cdk.aws_lambda.Function: Python's Function
uses Node.js' __dirname
#29099
Labels
@aws-cdk/aws-lambda
Related to AWS Lambda
bug
This issue is a bug.
documentation
This is a problem with documentation.
jsii
This issue originates in jsii, or this feature must be implemented in jsii.
needs-review
p2
Describe the issue
Example
The JSII's autogenerated code uses Node.js'
__dirname
, which isn't valid in Python.Ideally, you should want to use pathlib as best practice:
Also, the default Lambda function's handler in Python is:
Links
https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_lambda/Function.html
The text was updated successfully, but these errors were encountered: