2026-06-28T00:30:53.078-04:00 INIT_START Runtime Version: nodejs:24.v44 Runtime Version ARN: arn:aws:lambda:us-east-1::runtime:2cf0593e2cb85066242ca1115e05374aa5b1533615fb45cb3dd23bc8066ca239
2026-06-28T00:30:53.292-04:00 2026-06-28T00:30:53.292Z - ERROR Init Error {"errorType":"Error","errorMessage":"Dynamic require of \"buffer\" is not supported","stack":["Error: Dynamic require of \"buffer\" is not supported"," at file:///var/task/function.mjs:1:382"," at file:///var/task/function.mjs:3:3796"," at file:///var/task/function.mjs:1:493"," at file:///var/task/function.mjs:3:4322"," at file:///var/task/function.mjs:1:493"," at file:///var/task/function.mjs:3:6724"," at file:///var/task/function.mjs:1:493"," at file:///var/task/function.mjs:11:7001"," at file:///var/task/function.mjs:1:493"," at file:///var/task/function.mjs:11:7797"]}
2026-06-28T00:30:53.308-04:00 node:internal/process/promises:394
2026-06-28T00:30:53.308-04:00 triggerUncaughtException(err, true /* fromPromise */);
2026-06-28T00:30:53.308-04:00 ^
2026-06-28T00:30:53.308-04:00 Error: Dynamic require of "buffer" is not supported
2026-06-28T00:30:53.308-04:00 at file:///var/task/function.mjs:1:382
2026-06-28T00:30:53.308-04:00 at file:///var/task/function.mjs:3:3796
2026-06-28T00:30:53.308-04:00 at file:///var/task/function.mjs:1:493
2026-06-28T00:30:53.308-04:00 at file:///var/task/function.mjs:3:4322
2026-06-28T00:30:53.308-04:00 at file:///var/task/function.mjs:1:493
2026-06-28T00:30:53.308-04:00 at file:///var/task/function.mjs:3:6724
2026-06-28T00:30:53.308-04:00 at file:///var/task/function.mjs:1:493
2026-06-28T00:30:53.308-04:00 at file:///var/task/function.mjs:11:7001
2026-06-28T00:30:53.308-04:00 at file:///var/task/function.mjs:1:493
2026-06-28T00:30:53.308-04:00 at file:///var/task/function.mjs:11:7797
2026-06-28T00:30:53.308-04:00 Node.js v24.14.1
2026-06-28T00:30:53.313-04:00 INIT_REPORT Init Duration: 234.41 ms Phase: init Status:
The CreateEntityFunction function is failing with the following error below
Googling the error
Error: Dynamic require of "buffer" is not supportedindicates there ios an issue with a dependency using a CommonJS module import instead of an ESM import. One suggestion was to pass an argument to esbuild indicating the buffer module is external. This works because buffer is included in the Lambda runtime environment.