Serverless framework have piqued my interest since 2019. And since then I have followed PHP developers and communities to check if there is already an available package that can ship it as a "serverless" build. As far as I know the only available options back then are OpenWhisk and Bref.

For this post, I am sharing my setup notes on how to get started on deploying a simple Laravel PHP application using the Serverless Framework and the Bref plugin.

Just like with any project, you will need to prepare to install some software to build your project.

  1. NodeJS
  2. Serverless Framework
  3. AWS Account
  4. Laravel PHP Project

Each software installation is broken down into steps and has screenshots for it be more helpful as the AWS UI can be confusing sometimes. (or maybe its just me)

💡 I am sharing some gotchas along the way while I was using this framework extensively. I hope you can find it helpful on your workflows too.

👣 NodeJS Installation

NodeJS - https://nodejs.org/en/download/

node_download.png

Verify that you have installed this by typing this in the terminal

**node -v**
//should output a version
v16.3.1

**npm -v**
//should output a version
8.1.2

👣 Serverless Framework Installation

Serverless Framework will be our wrapper to do the hard lifting of orchestrating everything in AWS. You will need to install this via terminal, npm install -g serverless if there is an error about permission, try sudo npm install -g serverless .

cli_2.png