NodeJsServerless Functions with AWS Lambda

Serverless architecture allows you to run functions on demand without managing servers. AWS Lambda is a popular platform for deploying Node.js functions triggered by events like HTTP requests or database updates.

// index.js
exports.handler = async (event) => {
  return {
    statusCode: 200,
    body: JSON.stringify({ message: 'Hello from AWS Lambda!' })
  };
};