AWS Lambda

ES modules

  • Cannot use import statement outside a module

    • Add "module": "type" to package.json, but also make sure package.json is included in the zip file.
  • You still need to pack node_modules into the zip file as of 2022.
  • Even if you do all this, ES modules support is still shaky: https://github.com/aws/aws-sdk-js-v3/issues/3230