From e857f13369e9c24a6354ca654bbc2773849d8dd2 Mon Sep 17 00:00:00 2001 From: Jacky Lam Date: Thu, 13 Nov 2025 15:52:05 +0000 Subject: [PATCH] fix: Ensure custom resource runtime is at least Node 18 --- lib/plugins/aws/custom-resources/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/plugins/aws/custom-resources/index.js b/lib/plugins/aws/custom-resources/index.js index f25eb3d0e..b8b9f8f01 100644 --- a/lib/plugins/aws/custom-resources/index.js +++ b/lib/plugins/aws/custom-resources/index.js @@ -164,7 +164,8 @@ async function addCustomResourceToService(awsProvider, resourceName, iamRoleStat let runtimeVersion = 'nodejs22.x'; const providerRuntime = awsProvider.getRuntime(); - if (providerRuntime.startsWith('nodejs')) { + // AWS SDK v3 is only bundled with Node.js 18 and up + if (providerRuntime.startsWith('nodejs') && Number(providerRuntime.substring(6, 8)) >= 18) { runtimeVersion = providerRuntime; }