"""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