Thursday 4 August 2016

AWS Lambda–Part 1

 

AWS Lambda is really cool service for server less technologies. I am going to explain in detail with 5 parts.

Part 1 is very basic. We are going to create simple Lambda function. Input to Lambda function is FirstName and LastName. Output will be Full Name. I am going to use Python.

Step 1 :- First screen, if you don’t have any Lambda function – click on “Get Started Now”

image_thumb1

Step 2 – “Select blueprint” screen will appear. There are many templates available. For this example, click on “Next” button.

image_thumb3

Step 3: Click “Next” to “”Configure Triggers” screen

image_thumb6

Step 4: Select Name, description and runtime. We are going to select “Python 2.7 as a runtime”, select “Edit Code Online” for Code Entry type and write python code to execute.

image_thumb8

Scroll down to same screen and fill information about Handler, Role (It will create automatically, if you don’t have), Memory, Time Out and VPC.

Handler name format is <python file name>.<handler name>.

image_thumb10

Step 5: Click on “Create Function”

image_thumb12

Step 6: for testing we need to create Json string. Click on Actions –> Configure test event

image_thumb14

image_thumb15

Step 7 : click on Test

image_thumb18

Step 8 : Result

image_thumb20

This is very basic Lambda. I am going to explain API Gateway with Lambda in next part.