awstin.awslambda package¶
awstin.awslambda module¶
-
awstin.awslambda.
lambda_handler
(event_parser)[source]¶ Decorator factory for wrapping a lambda handler in a boilerplate event logger and parser.
The wrapped function is on the returned function’s inner attribute in order to be available for testing.
- Parameters
event_parser (callable) – Parser of a lambda handler input. Should take as an input the event and context as (dict, dict), and return a list of arguments that the wrapped handler should use.
- Returns
handler – Decorator for the Lambda handler, accepting a LambdaEvent. It logs the raw incoming event and the result.
- Return type
callable