Guest User

Untitled

a guest
Apr 24th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. """Base class for implementing Lambda handlers as classes.
  2. Used across multiple Lambda functions (included in each zip file).
  3. Add additional features here common to all your Lambdas, like logging."""
  4. class LambdaBase(object):
  5. @classmethod
  6. def get_handler(cls, *args, **kwargs):
  7. def handler(event, context):
  8. return cls(*args, **kwargs).handle(event, context)
  9. return handler
  10.  
  11. def handle(self, event, context):
  12. raise NotImplementedError
Add Comment
Please, Sign In to add comment