Commit c65977b5 authored by Jamie Tanna's avatar Jamie Tanna

Add note about PHPMiNDS' May talk about Bref

parent 88c81bc4
Pipeline #60608111 passed with stages
in 6 minutes and 24 seconds
"date": "2019-05-09T22:19:50+0100",
"title": "PHPMiNDS May: Running your PHP site on AWS Lambda with Bref",
"content": "Tonight at we had a talk from Neal ( about and how you can use it to build serverless PHP applications.\n\nNeal spoke about how, although PHP is officially supported in AWS Lambda, the difficulties of getting it running are still quite high, especially the complexities of getting Lambda Layers working.\n\nThis is where Bref comes in, which helps you scaffold the application and provide an easier interface for running applications on Lambda.\n\nNeal spoke about how Bref was built to remove choices from you, rather than allow you to make things super configurable, as an opinionated setup is easier to manage and build for.\n\nI was quite impressed with the AWS' Serverless Application Model (SAM) command-line tool and how you can easily spin up your serverless application locally - very cool!\n\nAn aside, but an interesting tidbit of info was that AWS charges you for CNAME lookups, opposed to A records which don't cost anything - a good thing to be aware of!\n\nNeal started off by showing us a PHP page running `<?php phpinfo(); ?>`, but noted that it wasn't super impressive. So for something much more exciting, Neal took us through taking an existing application using a PHP framework, and chucked it onto Lambda with Bref, in an *incredibly easy fashion*. I was incredibly bowled over how easy it was. All we needed to do was:\n\n- refer static assets to an S3 bucket/Content Distribution Network, not on the same host as the PHP process\n- externalise session stores, as you will most likely hit a different instance of your function\n- externalise your file store, i.e. an S3 bucket, as you can't store files long-term in a function's container, which can be done with pre-signed URLs\n\nAnd now we had a pretty standard PHP app, with an admin backend, working in AWS Lambda. Awesome stuff.\n\nAs Neal mentioned, now we're delegating some of these pieces of work to the cloud provider, we can remove a load of code from our application - win-win!\n\nNeal mentioned there are some performance impacts of running Lambdas in an AWS VPC, and how they can be ~10x increase in response times (citing\n\nBut Lambda can still make huge differences to your underlying bills - one user of Bref cited that for quite large workloads, they were saving ~25% against EC2.\n\nNeal also mentioned that there has been some work towards getting WordPress running on Lambda, although it's still very much a work in progress.\n\nAlthough I'm not a PHP dev, it was a great talk, and I can see lots of great things that I can apply to my own projects.",
"slug": "dc1e847e-c02f-453b-84d0-91e824be6a57",
"summary": "The May edition of the PHPMiNDS meetup, and things I've learnt about porting existing applications to AWS Lambda.",
"syndication": [],
"tags": [
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment