aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

Use .mjs extension for nodejs18.x runtime

Open
#1,832 3 comments 12 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### 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_

Contributor guide

Open the contributing guide

Research direction

Start with the AWS::Lambda::Function resource behavior for inline ZipFile content and the nodejs18.x runtime. Trace where CloudFormation chooses the generated entry-file extension, then verify that nodejs18.x produces index.mjs while other runtimes retain their existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, node.js
Domain
cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.