Have you thought about putting something like this, which would make this functional out of the box?
chrome.get(event.get("target", "https://example.com/"))
Maybe even something like this to use this setup outside of Lambda
if os.getenv('AWS_LAMBDA_FUNCTION_NAME') is None:
print(handler())