I wanted to deploy Serverless Microservices(PHP) using AWS Lambda for one of my projects. I was curious about the process happening inside the lambda container.
Prerequisites : We will create a layer of runtime in AWS lambda which contains and we will reference it in the lambda function.
After deploying both layer and function, it will look like below, Lambda Function has a layer of PHP runtime as, Now it's time to run the deployed Lambda function. Open Created Lambda Function and Test it, If everything’s fine, it will show output like, If we want to use an API gateway with a Lambda function, As mentioned here at Method Response, the response should be in JSON format.