Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """Base class for implementing Lambda handlers as classes.
- Used across multiple Lambda functions (included in each zip file).
- Add additional features here common to all your Lambdas, like logging."""
- class LambdaBase(object):
- @classmethod
- def get_handler(cls, *args, **kwargs):
- def handler(event, context):
- return cls(*args, **kwargs).handle(event, context)
- return handler
- def handle(self, event, context):
- raise NotImplementedError
Add Comment
Please, Sign In to add comment