AWS Security ChangesHomeSearch

AWS AWSCloudFormation documentation change

Service: AWSCloudFormation · 2025-11-22 · Documentation low

File: AWSCloudFormation/latest/TemplateReference/aws-properties-lambda-function-code.md

Summary

Updated Node.js module handling documentation and added Node.js 24+ experimental module detection feature

Security assessment

Changes clarify module handling behavior but don't address security vulnerabilities or add security-specific documentation

Diff

diff --git a/AWSCloudFormation/latest/TemplateReference/aws-properties-lambda-function-code.md b/AWSCloudFormation/latest/TemplateReference/aws-properties-lambda-function-code.md
index e84446de2..93c5c6f38 100644
--- a//AWSCloudFormation/latest/TemplateReference/aws-properties-lambda-function-code.md
+++ b//AWSCloudFormation/latest/TemplateReference/aws-properties-lambda-function-code.md
@@ -13 +13 @@ The [deployment package](https://docs.aws.amazon.com/lambda/latest/dg/gettingsta
-When you specify source code inline for a Node.js function, the `index` file that CloudFormation creates uses the extension `.js`. This means that Lambda treats the file as a CommonJS module. ES modules aren't supported for inline functions.
+When you specify source code inline for a Node.js function, the `index` file that CloudFormation creates uses the extension `.js`. This means that Node.js treats the file as a CommonJS module.
@@ -125 +125,3 @@ _Update requires_ : [No interruption](https://docs.aws.amazon.com/AWSCloudFormat
-When you specify source code inline for a Node.js function, the `index` file that CloudFormation creates uses the extension `.js`. This means that Lambda treats the file as a CommonJS module. ES modules aren't supported for inline functions.
+When you specify source code inline for a Node.js function, the `index` file that CloudFormation creates uses the extension `.js`. This means that Node.js treats the file as a CommonJS module.
+
+When using Node.js 24 or later, Node.js can automatically detect if a `.js` file should be treated as CommonJS or as an ES module. To enable auto-detection, add the `--experimental-detect-module` flag to the `NODE_OPTIONS` environment variable. For more information, see [Experimental Node.js features](https://docs.aws.amazon.com//lambda/latest/dg/lambda-nodejs.html#nodejs-experimental-features).