Created
March 21, 2024 16:35
-
-
Save sandoval0992/157d0bd18465d987573abd2ab3f6de99 to your computer and use it in GitHub Desktop.
Using require() in .mjs file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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