Skip to content

Instantly share code, notes, and snippets.

@sandoval0992
Created March 21, 2024 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sandoval0992/157d0bd18465d987573abd2ab3f6de99 to your computer and use it in GitHub Desktop.
Save sandoval0992/157d0bd18465d987573abd2ab3f6de99 to your computer and use it in GitHub Desktop.
Using require() in .mjs file
// Lambda execution failed with status 200 due to customer function error: require is not defined in ES module scope, you can use import instead.
const SDK = require("aws-sdk");
exports.handler = async (event) => {
const db = new SDK.DynamoDB.DocumentClient();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment