aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.11k stars 54 forks source link

Use .mjs extension for nodejs18.x runtime #1832

Open suhajda3 opened 10 months ago

suhajda3 commented 10 months ago

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

conanmercer commented 7 months ago

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 commented 2 weeks ago

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