What is the meaning of def lambda_handler(event, context):

0 votes
Can someone help me with the explanation of

def lambda_handler(event, context): in brief as I am new to lambda function and unable to understand the use of this statement.

Thank you in advance.
Dec 27, 2018 in AWS by Sradha
• 1,720 points
1,145 views

1 answer to this question.

0 votes

Hey @sradha, 

def lambda_handler(event, context): 

Here def is for defining a function with a handler name as lambda_handler, it can be anything depending on your use. 

event :- this is the type of data that is being passed to your handler. Generally it is of python dict type but again it can be of any type. 

context:- this is used to provide runtime information to your handler. This is of LambdaContext type.

for more details on this refer this documentation from amazon.

answered Dec 27, 2018 by Nabarupa

Related Questions In AWS

0 votes
1 answer

What is the maximum storage capacity of a node in Redshift?

You can create a cluster using either ...READ MORE

answered Oct 26, 2018 in AWS by Archana
• 5,560 points
113 views
0 votes
1 answer

What is the benfits of using Elastic Load Balancer in VPC?

Hello, @Jino. Talking about the Load Balancer, it ...READ MORE

answered Nov 20, 2018 in AWS by Priyaj
• 56,200 points
119 views
0 votes
1 answer

What is the use of AWS OpsWork?

AWS OpsWorks is a configuration management service ...READ MORE

answered Dec 14, 2018 in AWS by Tushar
32 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

What is the future of AWS?

Amazon Web Services (AWS) is a secure ...READ MORE

answered May 31 in AWS by ArchanaNagur
• 2,270 points
30 views
+5 votes
13 answers

AWS VPC - What is the difference between Internet Gateway & NAT

Internet Gateway An Internet Gateway is a logical connection ...READ MORE

answered Apr 24, 2018 in AWS by Flying geek
• 3,150 points
8,128 views