I have a small Node.js function on AWS Lambda that returns a very simple dynamic response, such as:
exports.handler = async (event, context) => {
const response = {
statusCode: 200,
body: "Hello World " + Math.random(),
};
return response;
};
I want to deploy this on the public web through lambda@edge. To do this, I need to connect it to a CloudFront distribution. However, CloudFront requires that I choose an origin. This function doesn't need an origin.
Is it possible to deploy this without a CloudFront origin or do I need to create a dummy page, such as a static file on S3?