INNER CODE UNIT · Python
handler
aws-powertools/powertools-lambda-python · layer_v3/layer/canary/app.py:49
def handler(event):
logger.info("Running checks")
check_envs()
verify_powertools_version()
send_notification()
return True
@logger.inject_lambda_context(log_event=True)
def on_event(event, context):
request_type = event["RequestType"]
# we handle only create events, because we recreate the canary on each run
if request_type == "Create":
return on_create(event)
return "Nothing to be processed"