New PHP AWS Serverless GitHub Repositories

New PHP AWS Serverless GitHub Repositories

To tell you the truth, I've been holding onto this idea for a while that the best way to send a text message with AWS is to use Twilio.

I had a project to send texts some time ago. Twilio was just so much easier to use for texts and emails than AWS. So I've been quietly avoiding using SNS for a while.

Which is why I made a special point that my first real Lambda project would involve SNS.

I just finished my first real Lambda project. There were two Lambda deployments: one for my simple form, and one to send text messages selected in that form.

Having already figured out how to render Laravel Framework's Blade templates on its own, without launching an app; having figured out how to do this in a Lambda
function; and, having published two open source repos to GitHub with this code, I was able to focus on SNS.

Coming into SNS cold, learning from the ground up, I spent a week or so venturing into my AWS console, watching videos, reading a lot of articles, poring over AWS and Serverless Framework docs. I played with code a lot, executing it locally, and deploying to Lambda via the Serverless Framework, seeing what the results were in my browser and in the AWS console.

There are a lot of code examples for Lambda written in its native languages. A lot of articles. A lot of videos. But there are not a lot of code examples for Lambda written in PHP. A confirmation of what I already experienced. I intended to publish code samples of my PHP Lambda functions after I got my forms working in Lambda. After the fact.

Because my initial experience with SNS was not so wonderful, I decided that I was not going to worry about publishing code samples. It was enough to get my own code working, to understand this aspect of AWS. I should spend my time going down whatever rabbit hole I find myself in, take extra time reading docs, and not worry about publishing sample code right off the bat. Which I did. However, I changed my mind!

I changed my mind because I knew I was going to publish code samples based on my forms anyways. I created a local repo only, and put code in there alongside my Lambda forms code. It was great playing with both sets of code at the same time. One set of code was "anything goes", and the other set of code was formal. Going back-and-forth was a great exercise.

One of the things that came out was my not being clear about sending AWS credentials via the Serverless Framework in local development, and Lambda getting permissions to use other AWS services. To help me understand this stuff, and to share these steps with you, I did an article about it. With things chronicled, I standardized my code sample, and my own Lambda code, to one way of doing credentials, which really helps  readability.

Right from the get-go, I assumed that the way to send a text message in SNS is to create an SNS Topic, and then an SNS Subsription to that Topic. Which you can. When I realized that I could send an SMS via a Topic-less SNS, I already had the code that creates the Topic and Subscription figured out. So I put that in my code sample repo. There is also a code sample for sending a text message in a Lambda function via SNS without an SNS Topic.

I was curious about sending emails as well within a Lambda function. So I tried out SES with Lambda. I included a code sample for SES in my repo.

For things that came up along the way, such as the SES "sandbox", I added comments to my code, or noted it in my README's.

I added README.md's Amazon implements something called an email "sandbox", which I note in my sample code. For stuff like this, I comment my code, and/or mention it in my readme's.

My new serverless repos are at https://github.com/lasallesoftware-serverless.


Thank you to my wonderful, and intrepid, sponsors of my PHP Serverless Project.
They took a chance on me, to benefit our worldwide PHP Community!
Luke Galea is a veteran technology leader who began coding professionally during the dot-com boom. While Ruby, Elixir, and Erlang are his tools of choice, PHP has remained a constant thread throughout his two-decade career spanning healthcare, dating, nutrition coaching, education, and workforce management.

His journey includes scaling high volume consumer facing sites HotOrNot and Ashley Madison where PHP powered the core infrastructure. Even when working with other technologies, Luke has consistently leveraged PHP for marketing technology, community forums, and developer resources.

A committed community builder, he founded Toronto's Erlang user group and actively supports the Toronto Elixir and GTA PHP communities.

Currently focused on leadership coaching and technology advisory, Luke loves solving hard problems with smart people. Call him if you want to riff on something awesome.
Luke Galea
Restream.io subscription sponsor
Luke Galea is a veteran technology leader who began coding professionally during the dot-com boom. While Ruby, Elixir, and Erlang are his tools of choice, PHP has remained a constant thread throughout his two-decade career spanning healthcare, dating, nutrition coaching, education, and workforce management. His journey includes scaling high volume consumer facing sites HotOrNot and Ashley Madison where PHP powered the core infrastructure. Even when working with other technologies, Luke has consistently leveraged PHP for marketing technology, community forums, and developer resources. A committed community builder, he founded Toronto's Erlang user group and actively supports the Toronto Elixir and GTA PHP communities. Currently focused on leadership coaching and technology advisory, Luke loves solving hard problems with smart people. Call him if you want to riff on something awesome.
Tolga Ercan is an accomplished technology executive with over two decades of experience leading high-performing engineering organizations across SaaS, fintech, and consumer technology sectors. He currently serves as Director of Engineering at Vetster, a veterinary telehealth platform redefining access to pet care through innovative digital solutions.

Tolga has built a career scaling engineering teams, driving cloud migration strategies, and delivering resilient, scalable systems. His leadership experience includes senior roles at Instagram, Edmunds, and early-stage startups, where he has consistently championed technical excellence, operational efficiency, and cultural growth. He has also leveraged technologies such as Laravel to build and scale modern, customer-facing applications in startup environments, applying best practices in software architecture and agile development.

As a supporter of the open source community, Tolga believes in the importance of open innovation and actively backs initiatives that advance software transparency, interoperability, and access. He is committed to fostering the future of technology through mentorship, organizational leadership, and community engagement.
Tolga Ercan
Basecamp subscription sponsor
Tolga Ercan is an accomplished technology executive with over two decades of experience leading high-performing engineering organizations across SaaS, fintech, and consumer technology sectors. He currently serves as Director of Engineering at Vetster, a veterinary telehealth platform redefining access to pet care through innovative digital solutions. Tolga has built a career scaling engineering teams, driving cloud migration strategies, and delivering resilient, scalable systems. His leadership experience includes senior roles at Instagram, Edmunds, and early-stage startups, where he has consistently championed technical excellence, operational efficiency, and cultural growth. He has also leveraged technologies such as Laravel to build and scale modern, customer-facing applications in startup environments, applying best practices in software architecture and agile development. As a supporter of the open source community, Tolga believes in the importance of open innovation and actively backs initiatives that advance software transparency, interoperability, and access. He is committed to fostering the future of technology through mentorship, organizational leadership, and community engagement.