#Nodejs20
Two functions in my own Terraform still say `nodejs20.x`. AWS deprecated that Lambda runtime in April, and `terraform validate` passed it.

`python3.10` follows on Oct 31. Nothing is blocked that day and the CLI keeps deploying into mid-2027. AWS may stop patching.

#AWS #Lambda
October 12, 2026 at 12:00 PM
Using a Lambda Function URL with AWS CloudFront via AWS CDK
> **Update, October 2026:** two things have changed since I wrote this. The `nodejs20.x` Lambda runtime stopped receiving security patches on 30 April 2026, so use `Runtime.NODEJS_24_X` for new functions. And CloudFront now supports Origin Access Control for function URLs: `FunctionUrlOrigin.withOriginAccessControl(fnUrl)` with `authType: FunctionUrlAuthType.AWS_IAM` lets only your distribution invoke the URL, which is the production answer to the `NONE` auth type I warn about in the tips below. Check that the function's resource policy grants CloudFront both `lambda:InvokeFunctionUrl` and `lambda:InvokeFunction`; at the time of this update the CDK only adds the first. ## Preface So, one of my friends who works extensively with the CDK asked me whether I had attempted to use a lambda function accessible via a function URL with a CloudFront distribution. His primary objectives were to use custom domains and customise caching behaviour from the origin (the function URL in this case). When he was attempting this PoC, the CDK didn't have a `FunctionUrlOrigin` and he instead had to try implementing this using `HttpOrigin`. Unfortunately, he wasn't able to get it to work then. Today, I had an impulse to check out whether this was possible, so I went on an R&D frenzy to get it working. Here's how I did it. ## The Journey ### 1. Create a CDK project Create a CDK TypeScript project in an empty directory using: npx cdk init app --language typescript ### 2. Create the function URL stack Create a stack for the Lambda function that's accessible using a function URL at `lib/fnurl-stack.ts`. Notice the `invokeMode` property which is set as `RESPONSE_STREAM`; this configures the function's runtime and enables response streaming. import { Stack, StackProps, Duration, CfnOutput } from 'aws-cdk-lib/core'; import { FunctionUrl, Runtime, FunctionUrlAuthType, InvokeMode } from 'aws-cdk-lib/aws-lambda'; import { NodejsFunction } from 'aws-cdk-lib/aws-lambda-nodejs'; import { Construct } from 'constructs'; export class FnUrlStack extends Stack { fnUrl: FunctionUrl; constructor(scope: Construct, id: string, props?: StackProps) { super(scope, id, props); const fn = new NodejsFunction(this, 'StreamingResponseFn', { runtime: Runtime.NODEJS_20_X, entry: 'functions/streaming-response-test.ts', timeout: Duration.minutes(5), }); this.fnUrl = fn.addFunctionUrl({ authType: FunctionUrlAuthType.NONE, invokeMode: InvokeMode.RESPONSE_STREAM, }); new CfnOutput(this, 'Lambda FnURL Endpoint', { value: this.fnUrl.url }); } } ### 3. Install esbuild Since I want to use local bundling, I'll install esbuild as a dev-dependency. npm i -D esbuild ### 4. Write the streaming handler Now, let's write the Lambda handler `functions/streaming-response-test.ts` and make it handle returning a response stream. import type { APIGatewayProxyEventV2, Context, Handler } from "aws-lambda"; import { promisify } from "node:util"; import { Writable, Readable, pipeline as streamPipelineFn } from "node:stream"; declare global { namespace awslambda { export namespace HttpResponseStream { function from(writable: Writable, metadata: any): Writable; } export type ResponseStream = Writable & { setContentType(type: string): void; } export type StreamifyHandler = (event: APIGatewayProxyEventV2, responseStream: ResponseStream, context: Context) => Promise<any>; export function streamifyResponse(handler: StreamifyHandler): Handler<APIGatewayProxyEventV2>; } } const createRange = (start: number, end: number) => { const range = []; for (let i = start; i <= end; i++) { range.push(i); } return range; }; const pipeline = promisify(streamPipelineFn); const txtData = createRange(1, 1000000).join(', '); export const handler = awslambda.streamifyResponse(async (_event, responseStream): Promise<any> => { const requestStream = Readable.from(Buffer.from(txtData)); await pipeline(requestStream, responseStream); }); ### 5. Create the CloudFront distribution stack Next, let's create the stack `lib/dist-stack.ts` for the CloudFront distribution. Notice how we set the `cachePolicy` to `CACHING_DISABLED`. This is to ensure that we always forward the request to the origin and get an up-to-date response every time, while we're developing our solution. I have an inkling that my friend possibly missed this `cachePolicy` configuration while he was attempting his implementation. import { StackProps, Stack, CfnOutput } from 'aws-cdk-lib/core'; import { Distribution, CachePolicy, HttpVersion } from 'aws-cdk-lib/aws-cloudfront'; import { FunctionUrlOrigin } from 'aws-cdk-lib/aws-cloudfront-origins'; import { FunctionUrl } from 'aws-cdk-lib/aws-lambda'; import { Construct } from 'constructs'; interface DistStackProps extends StackProps { fnUrl: FunctionUrl; } export class DistStack extends Stack { constructor(scope: Construct, id: string, props: DistStackProps) { super(scope, id, props); const cdnDistribution = new Distribution(this, 'CloudfrontDist', { defaultBehavior: { origin: new FunctionUrlOrigin(props.fnUrl), cachePolicy: CachePolicy.CACHING_DISABLED, }, enableLogging: true, httpVersion: HttpVersion.HTTP2_AND_3, enableIpv6: true, }); new CfnOutput(this, 'Distribution Domain Name', { value: cdnDistribution.domainName }); } } ### 6. Wire the stacks together Finally, let's wire up the stacks in the CDK app's entry point `bin/main.ts`. Here we instantiate our stacks, get the function URL reference from `fnurl-stack.ts` and pass it to `dist-stack.ts` as a prop. #!/usr/bin/env node import 'source-map-support/register'; import * as cdk from 'aws-cdk-lib'; import { FnUrlStack } from '../lib/fnurl-stack'; import { DistStack } from '../lib/dist-stack'; const app = new cdk.App(); const fnUrlStack = new FnUrlStack(app, 'FnUrlStack'); new DistStack(app, 'DistStack', { fnUrl: fnUrlStack.fnUrl }); ### 7. Deploy Once all of this is done, just deploy the app using: npx cdk deploy --all The deployment takes around 5 minutes and once it's completed you get some outputs from the CDK CLI which contain the URL for the Lambda function and the domain name of the CloudFront distribution. ✅ FnUrlStack ✨ Deployment time: 41.57s Outputs: FnUrlStack.ExportsOutputFnGetAttStreamingResponseFnFunctionUrl3079B143FunctionUrl68DAFEE3 = https://xxxxx7ybnafkqxxxxxvalm0xxxxx.lambda-url.ap-south-1.on.aws/ FnUrlStack.LambdaFnURLEndpoint = https://xxxxx7ybnafkqxxxxxvalm0xxxxx.lambda-url.ap-south-1.on.aws/ Stack ARN: arn:aws:cloudformation:ap-south-1:xxxxxxxxx:stack/FnUrlStack/saaed23-d74c-11ee-xxxx-xxxxxxx ✅ DistStack ✨ Deployment time: 270.14s Outputs: DistStack.DistributionDomainName = xxdfwedwedxxx.cloudfront.net Stack ARN: arn:aws:cloudformation:ap-south-1:xxxxxxxxx:stack/DistStack/sdf33r3-d74c-11ee-xxxx-xxxxxxx ✨ Total time: 272.63s A deployable CDK sample application can be found here: ashishpandeyone/cdk-cloudfront-lambda-streaming. ## Tips * When working with CloudFront, first get the origin working directly. So, in our case, we should first get the `FnUrlStack` deployed and test the endpoint using the function URL directly. * The function URL here uses the `NONE` auth type; you don't want to do that in production. * CloudFront supports logging requests. If you're stuck, enable logging: that creates an S3 bucket which stores your request logs and helps you debug potential issues, especially those around origin selection and caching behaviours. * The Lambda function used here was a basic function. When using function URLs with CloudFront, you can opt for a Lambdalith design pattern if you want to deploy an application that deals with different cache behaviours for different requests. CloudFront is extremely configurable. * The primary advantage of a streaming response is to reduce the time to first byte (TTFB), not your function's execution time. Streaming responses can increase the function's execution time due to the nature of how streaming systems work. This is my first attempt at writing about technology and I'd appreciate any constructive feedback and questions regarding this topic. Thank you for the read! Here's an article by Shivam, another AWS pro from my network. It details the conceptual nuances and shows you how to accomplish the same result using the AWS console. _Originally published at ashishkumarpandey.com._
dev.to
October 10, 2026 at 8:08 PM
AWS Lambda + Terraform: our free EOLkits scanner found nodejs20.x in a literal runtime declaration. In our synthetic variable-based example, it found nothing.

It scans patterns, not resolved infrastructure. Try both forms before relying on a clean result.

https://eolkits.com/scan/
September 30, 2026 at 3:01 PM
Five lines in a US fintech repo stop deploying before April 2027, and an AI assistant wrote every one. AWS Lambda blocks updates to nodejs20.x, python3.9 and dotnet6 on 2027-03-03 — after that, no hotfix. The ubuntu-22.04 runner…

https://getreadystack.com/tools/runtime-eol-deploy-block-audit
September 12, 2026 at 10:30 AM
CloudFormation introduced a bug to us-west-2 last week. It has made its way to us-east-1 now :sadpanda:

It interprets `provided.al2023` as null (or something) for layers
```
[provided.al2, null, nodejs16.x, nodejs18.x, nodejs20.x, python3.8, python3.9, java8.al2, java11, dotnet6]

#aws #awssupport
March 18, 2025 at 5:02 PM
Feed: "midrange-l mailing list"
By: bdietz400@xxxxxxxxx (Bryan Dietz) on Friday, June 20, 2025
Re: newman in IBMi
Re: newman in IBMi -- https://www.npmjs.com/package/newman i tried the install and the install worked with NodeJS v20 on V7.5 I cannot test it but running /QOpenSys/pkgs/lib/nodejs20/bin/newman --version Returned 6.2.1 Bryan Miguel Peralta svi wrote on 6/20/2025 8:37 AM:
archive.midrange.com
June 21, 2025 at 10:09 AM
Feed: "LWN.net"
By: jzb on Wednesday, May 7, 2025
Security updates for Wednesday
Security updates have been issued by Fedora (incus and nodejs20), Red Hat (freetype, kernel, kernel-rt, libsoup, libtiff, redis, redis:6, and thunderbird), SUSE (apparmor, chromium, grafana, ImageMagick, java-11-openjdk, java-17-openjdk, libsoup, libsoup2, libxslt, opensaml, rabbitmq-server, rubygem-rack-1_6, sqlite3, and thunderbird), and Ubuntu (kernel, libfcgi, libraw, libsoup2.4, linux, linux-aws, linux-aws-5.15, linux-gcp, linux-gke, linux-gkeop, linux-hwe-5.15, linux-ibm, linux-ibm-5.15, linux-intel-iotg, linux-intel-iotg-5.15, linux-kvm, linux-lowlatency, linux-lowlatency-hwe-5.15, linux-nvidia, linux-nvidia-tegra, linux-nvidia-tegra-igx, linux-oracle, linux-oracle-5.15, linux-raspi, linux, linux-aws, linux-aws-5.4, linux-azure-5.4, linux-gcp, linux-gcp-5.4, linux-hwe-5.4, linux-ibm, linux-kvm, linux-oracle, linux-oracle-5.4, linux, linux-aws, linux-aws-6.8, linux-gcp, linux-gcp-6.8, linux-gke, linux-gkeop, linux-hwe-6.8, linux-ibm, linux-lowlatency, linux-lowlatency-hwe-6.8, linux-nvidia, linux-nvidia-6.8, linux-nvidia-lowlatency, linux-oem-6.8, linux-oracle, linux-oracle-6.8, linux, linux-aws, linux-aws-hwe, linux-gcp, linux-gcp-4.15, linux-hwe, linux-kvm, linux-oracle, linux, linux-aws, linux-gcp, linux-gcp-6.11, linux-hwe-6.11, linux-lowlatency, linux-lowlatency-hwe-6.11, linux-oracle, linux-raspi, linux-aws-fips, linux-fips, linux-gcp-fips, linux-azure, linux-azure, linux-azure-4.15, linux-azure, linux-azure-5.15, linux-azure-fde, linux-azure-fde-5.15, linux-azure, linux-azure-6.11, linux-azure-6.8, linux-azure-fips, linux-intel-iot-realtime, linux-realtime, linux-oem-6.11, linux-raspi, linux-realtime, python, python-scrapy, and ruby-carrierwave).
lwn.net
May 8, 2025 at 1:35 PM
Skip the outdated versions and install the latest Node.js 20 using a trusted PPA — perfect for modern apps, APIs, and frameworks like Next.js or Express!

Refer to our wiki:
wiki.crowncloud.net/index.php?Ho...

#Ubuntu2504 #Nodejs20 #PPAInstall #OpenSource
How To Install Latest Node Js On Ubuntu 25 04 With PPA
Light
wiki.crowncloud.net
May 4, 2025 at 12:01 PM
Security updates for Wednesday Security updates have been issued by AlmaLinux (gstreamer1-plugins...

https://lwn.net/Articles/1022853/

Result Details
Security updates for Wednesday
Security updates have been issued by **AlmaLinux** (gstreamer1-plugins-bad-free and kernel), **Arch Linux** (bind and varnish), **Debian** (glibc and syslog-ng), **Fedora** (microcode_ctl, mozilla-ublock-origin, nodejs20, and nodejs22), **Mageia** (firefox, nss, rootcerts, open-vm-tools, sqlite3, and thunderbird), **Oracle** (gstreamer1-plugins-bad-free, kernel, libsoup, nodejs:22, php, php:8.2, php:8.3, python-tornado, redis, and redis:7), **Red Hat** (libsoup, pcs, and python-tornado), **Slackware** (mozilla), **SUSE** (bind, dnsdist, elemental-operator, govulncheck-vulndb, gstreamer-plugins-bad, jetty-annotations, jq, libnss_slurm2, libyelp0, mariadb, nvidia-open-driver-G06-signed, prometheus-blackbox_exporter, python-h11, python-httpcore, python-setuptools, python312, python39-setuptools, screen, sqlite3, umoci, and webkit2gtk3), and **Ubuntu** (cifs-utils, glibc, linux-aws, linux-intel-iotg-5.15, linux-nvidia-tegra-igx, linux-raspi, linux-aws-fips, linux-hwe-6.8, linux-lowlatency, linux-lowlatency-hwe-6.11, linux-oracle, linux-raspi, linux-raspi-5.4, and net-tools).
lwn.net
May 28, 2025 at 2:04 PM
Node 20 support seems to have landed in AWS Lambda

„Lambda: Add Node 20 (nodejs20.x) support to AWS Lambda.“

github.com/aws/aws-sdk-...

#aws #awscommunity #serverless
github.com
November 8, 2023 at 9:46 PM
昔書いたLambdaのNodejs16コードをリファクタリングしつつNodejs20にしてた。
ユニットテストも追加して変更かなりしやすくなった。
March 31, 2024 at 3:00 PM