Created
November 11, 2017 06:42
-
-
Save andriisoldatenko/04aca2c80b17a788a4f7bff0aed8332e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import importlib | |
import sys | |
# Import your lambda python module | |
mod = importlib.import_module(sys.argv[1]) | |
function_handler = sys.argv[2] | |
lambda_function = getattr(mod, function_handler ) | |
event = {'name': 'Andrii'} | |
context = {'conference_name': 'PyCon Israel'} | |
try: | |
data = function_handler(event, context) | |
print(data) | |
except Exception as error: | |
print(error) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment