Company
Date Published
Author
Gary Hockin
Word count
1143
Language
English
Hacker News points
None

Summary

This article discusses how to run a PHP script on AWS Lambda using the Bref project, which enables deployment of custom runtimes and layers for Lambdas. The author creates a simple web hook that responds to SMS messages from Twilio, generates dynamic TwiML responses, and uses Bref to deploy the PHP code as a Lambda serverless function. With the help of Composer, AWS CLI, and SAM tools, the script is packaged up and deployed to AWS Lambda, where it can be triggered by HTTP requests. The article concludes that webhooks are a powerful way to respond to events from Twilio phone numbers and that Bref makes it easier to run PHP on Lambda.