Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use .mjs extension for nodejs18.x runtime #1832

Open
suhajda3 opened this issue Oct 27, 2023 · 3 comments
Open

Use .mjs extension for nodejs18.x runtime #1832

suhajda3 opened this issue Oct 27, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@suhajda3
Copy link

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

@suhajda3 suhajda3 added the enhancement New feature or request label Oct 27, 2023
@conanmercer
Copy link

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

@kymcharlesworth-srg
Copy link

Now Sep 2024 and still an issue. One of countless examples of CloudFormation being an end-to-end screw up.

@kpsinghv
Copy link

kpsinghv commented Dec 30, 2024

Dec 2024 and nearly 2025 it is still an issue. Sad nobody looked at it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants