-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
As you are probably aware, AWS SDK v2 is not included in the latest Node runtimes. From what I see, the lambda code is still using the v2 version instead of v3, and the custom resource fails to run with the following error:
{
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module 'aws-sdk/clients/route53'\nRequire stack:\n- /var/task/verifier.js\n- /var/task/handlers/create.js\n- /var/task/handlers/index.js\n- /var/task/index.js\n- /var/runtime/index.mjs",
"stack": [
"Runtime.ImportModuleError: Error: Cannot find module 'aws-sdk/clients/route53'",
"Require stack:",
"- /var/task/verifier.js",
"- /var/task/handlers/create.js",
"- /var/task/handlers/index.js",
"- /var/task/index.js",
"- /var/runtime/index.mjs",
" at _loadUserApp (file:///var/runtime/index.mjs:1087:17)",
" at async UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1119:21)",
" at async start (file:///var/runtime/index.mjs:1282:23)",
" at async file:///var/runtime/index.mjs:1288:1"
]
}As there currently is no way to deploy the construct in the current state, I think a short-term fix would be to provide a 2.1.1 release with Node 16 runtime (as it's still supported until June). A longer-term and simple option would be to bundle the v2 SDK. Finally, the harder option would be a complete upgrade.
I'll see if I can get a PR started for the upgrade.
jayalfredprufrock
Metadata
Metadata
Assignees
Labels
No labels