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,760 points
13,967 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,640 points
2,099 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
• 58,020 points
950 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, 2019 in AWS by ArchanaNagur
• 2,360 points
2,303 views
+9 votes
17 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,280 points

edited Jul 10, 2023 by Khan Sarfaraz 128,473 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP