Lambda handler

The function in your code that Lambda calls for each event, receiving the event and a context object.

In more detail

A handler reads its input from the event, does one focused job and returns a result that can be turned into JSON. Keep handlers narrow; long workflows belong in an orchestration service such as a state machine.

Example

def handler(event, context):
    return {"statusCode": 200, "body": "{}"}

Related terms

Taught in

References