• Thu, Nov 2024

Deploy a PHP Application on AWS Lambda Function Serverless

In this post, I will explain the steps to deploy a simple PHP email MX record validation application on AWS lambda function using Bref layers. AWS Lambda natively supports Java, Go, PowerShell, Node. js, C#, Python, and Ruby code, not PHP. You can deploy the lite weight PHP function to improve the application performance and it will reduce cost compared with the EC2 instance. AWS is offering the f

In this post, I will explain the steps to deploy a simple PHP email MX record validation application on AWS lambda function using Bref layers. AWS Lambda natively supports Java, Go, PowerShell, Node. js, C#, Python, and Ruby code, not PHP. You can deploy the lite weight PHP function to improve the application performance and it will reduce cost compared with the EC2 instance. AWS is offering the first one million requests free and you need an AWS account with a payment setup. The only disadvantage is that port 25(mail/SMTP) will not support it. 


In this post, I will explain the steps to deploy a simple PHP email MX record validation application on AWS lambda function using Bref layers. AWS Lambda natively supports Java, Go, PowerShell, Node. js, C#, Python, and Ruby code, not PHP. You can deploy the lite weight PHP function to improve the application performance and it will reduce cost compared with the EC2 instance. AWS is offering the first one million requests free and you need an AWS account with a payment setup. The only disadvantage is that port 25(mail/SMTP) will not support it. 



 

aws-php-lambda.png

 

GitHub Source  

Prerequisites  
 

  • AWS Account
  • Composer
  • PHP
  • VS Code IDE



    Create a Directory  
    Create a directory with your project name. 

$mkdir phpLambdaFunction
$cd phpLambdaFunction

composer.json  
Make sure to install composer software on your local machine. The following composer code contains bref/bref

{
"name": "srinivas/php-lambda-function",
"description": "PHP lambda function",
"require": {
"bref/bref": "^2.0"
},
"authors": [
{
"name": "Srinivas Tamada",
"email": "srinivas@9lessons.info"
}
]
}

 

 

 

John Smith

Alice, quite forgetting in the air. Even the Duchess by this time, and was delighted to find quite.