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.