Skip to content

Commit ce52589

Browse files
authored
Merge pull request #114 from jackylamhk/fix/custom-resource-runtime
fix: Ensure custom resource runtime is at least Node 18
2 parents 2c2b297 + e857f13 commit ce52589

File tree

1 file changed

+2
-1
lines changed
  • lib/plugins/aws/custom-resources

1 file changed

+2
-1
lines changed

lib/plugins/aws/custom-resources/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ async function addCustomResourceToService(awsProvider, resourceName, iamRoleStat
164164

165165
let runtimeVersion = 'nodejs24.x';
166166
const providerRuntime = awsProvider.getRuntime();
167-
if (providerRuntime.startsWith('nodejs')) {
167+
// AWS SDK v3 is only bundled with Node.js 18 and up
168+
if (providerRuntime.startsWith('nodejs') && Number(providerRuntime.substring(6, 8)) >= 18) {
168169
runtimeVersion = providerRuntime;
169170
}
170171

0 commit comments

Comments
 (0)