from __future__ import print_function import json import logging log = logging.getLogger() log.setLevel(logging.DEBUG) # this adds the component-level `lib` directory to the Python import path import sys sys.path.append("../../") # import the shared library, now anything in component/lib/__init__.py can be # referenced as `lib.something` import lib def handler(event, context): log.debug("Received event {}".format(json.dumps(event))) return {}