Home / Companies / Twilio / Blog / Post Details
Content Deep Dive

Responding to SMS in PHP using AWS Lambda and Bref

Blog post from Twilio

Post Details
Company
Date Published
Author
Gary Hockin
Word Count
1,143
Language
English
Hacker News Points
-
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.