aws-cloudformation/cloudformation-coverage-roadmap

Use .mjs extension for nodejs18.x runtime

Opened this issue · 1 comments

Name of the resource

AWS::Lambda::Function

Resource name

No response

Description

When you include your function source inline with the ZipFile parameter, CloudFormation places it in a file named index and zips it to create a deployment package. CloudFormation automatically adds the .js extension, which is no longer the default for version 18.x.

When creating a Lambda function in the Management Console with Node.js 18.x, an index.mjs is created correctly by default.

It would be nice to see CloudFormation create an index.mjs instead of an index.js when nodejs18.x runtime is defined.

Other Details

No response

I have faced the same issue, are we sure this is currently not supported?

Curious if anyone has found a workaround if this truly is not currently supported