Automation example for AWS Lambda

I’ve been following the instructions from to get the automation working. However it uses a webhook, and I’d like to use AWS lambda instead. Do you have an AWS lambda example available or could you tell me how to convert the webhook example to AWS lambda? I’d appreciate any help.