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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners