Create an HTTP API by using the AWS Management Console
Open the API Gateway console .
Choose Create API.
Under HTTP API, choose Build.
Choose Add integration, and then choose an AWS Lambda function or enter an HTTP endpoint.
For Name, enter a name for your API.
Choose Review and create.
Choose Create.
xxxxxxxxxx
export const handler = async (event) => {
const response = {
statusCode: 200,
body: JSON.stringify('Hello from Lambda!'),
};
return response;
};
https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started.html