aws-cdk-lib: CustomResourceProvider does not allow .mjs ECMAScript modules #31049
Labels
@aws-cdk/custom-resources
Related to AWS CDK Custom Resources
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
p2
Describe the feature
When creating a CustomResourceProvider with NODEJS_20_X runtime and specifying a codeDirectory that contains an index.mjs file, the deployment fails. ("Error: cannot find codeDirectory/index.js").
Use Case
Since it is the default now to have an index.mjs ECMAScript module when you create a node 20.x Lambda Function in the AWS console, I would expect that this is possible for CDK Custom Resources as well.
Proposed Solution
No response
Other Information
No response
Acknowledgements
CDK version used
2.151.0
Environment details (OS name and version, etc.)
MacOS Sonoma
The text was updated successfully, but these errors were encountered: