Pragmatism in the real world

PHP Architect: Serverless PHP With Bref, Part 2

Cover 768x994

Part two of my article on using Serverless PHP using Bref has been published! In part one, I introduced Bref as we wrote a simple “Hello World” application.

Part follows this up exploring a more complete serverless application, my Project365 website. This S3 hosted static website is build using a serverless PHP function that connects to the Flickr API to retrieve my my one-photo-per-day images and present them on a single page per year. In the article I show how to use Bref to connect to a 3rd party API and use the AWS PHP SDK to update S3 and invalidate CloudFront caches.

The article is in the June 2019 issue of php[architect]. If you don’t have a subscription, now may be a good time to take one out!