I am pretty new to both nodejs and AWS Lambda. I have created a very small nodejs function that is working fine locally. Now I need to run it on AWS Lambda, but looks like there are some handlers requirement which I am not understanding completely.
Below is my nodejs function that I need to run it on Lambda. Any idea what changes do I need to make to execute it on AWS? Thanks
(async function () {
DOMAIN = "abc.xyz.com";
KEY = "***";
const mailchimpClient = require("@mailchimp/mailchimp_transactional")(KEY);
const run = async () => {
const response = await mailchimpClient.senders.addDomain({
domain: DOMAIN,
});
console.log(response);
};
run();
})();