For Lambda function templates that work with Application Load Balancers, see application-load-balancer-serverless-app on github. Alternatively, open the Lambda console , create a function, and select one of the following from the AWS Serverless Application Repository:
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lambda-functions.html