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.