Created
December 12, 2018 14:14
-
-
Save adhorn/3abee67a9147962bc278f4671aa23d52 to your computer and use it in GitHub Desktop.
Testing lambda Layers in Python
This file contains 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
def cust_fun(): | |
print("Hello from the deep layers!!:") | |
return 1 |
This file contains 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 json | |
import sys | |
import os | |
sys.path.append('/opt/python_libs') | |
import custom_func as cf | |
def lambda_handler(event, context): | |
print os.listdir("/opt/python_libs/.") | |
cf.cust_fun() | |
return { | |
'statusCode': 200, | |
'body': json.dumps('Hello from Lambda Layers!') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment