Skip to content

Instantly share code, notes, and snippets.

@adhorn
Created December 12, 2018 14:14
Show Gist options
  • Save adhorn/3abee67a9147962bc278f4671aa23d52 to your computer and use it in GitHub Desktop.
Save adhorn/3abee67a9147962bc278f4671aa23d52 to your computer and use it in GitHub Desktop.
Testing lambda Layers in Python
def cust_fun():
print("Hello from the deep layers!!:")
return 1
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