How to Write the AWS Lambda Function with Python?
We’re going to create Lambda Function with Python today. Let’s do something a little more calculation than a simple Hello World application. Let’s pass a couple of numbers into the function, and have it return the sum, difference, multiply and divide of the two numbers.
1. Create the new Lambda Function called Python-Test in AWS Lambda
![](https://nayzawlin.info/wp-content/uploads/2020/03/image-1024x485.png)
2. Create the new Test Event called TestTwoNumbers
![](https://nayzawlin.info/wp-content/uploads/2020/03/image-3.png)
3. Add below code to Lambda function
![](https://nayzawlin.info/wp-content/uploads/2020/03/image-4.png)
4. Execution Result
![](https://nayzawlin.info/wp-content/uploads/2020/03/image-5.png)
That’s it. I hope this will help. ?
Photo: https://www.brandeps.com