Category: PHP, api

We have had custom layers for a long time in Lambda, I have used them for a few mini app I have personally as well as professionally. But first things first how can we create an deploy a PHP layer and some sample PHP code to run in lambda without using one of the pre-built packages and why would you want to do this.

We will use the in page editor, remove the existing 3 files ( right click and delete ) create a folder “src”, in the source folder create a new file “index.php” This is the file called when we change the handler to “index”.

We will have to create a test event, edit to provide a key “user” with the value “{yourname}: Scroll up and click “Test” In part 2 we will explore the bootstrap file and how to invoke the Lambda function with API Gateway.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners