I want to create a lambda function in python3.7 that it will use boto to perform some AWS query.
The function is very simple. I added import boto to the simple vanilla template to try out how to enable boto.
import json
import boto
def lambda_handler(event, context):
# TODO implement
return {
'statusCode': 200,
'body': json.dumps('Hello from Lambda!')
}
Needless to say, it fails:
Response:
{
"errorMessage": "Unable to import module 'lambda_function': No module named 'boto'",
"errorType": "Runtime.ImportModuleError"
}
So how can I add boto to my code?
I have checked out Layers and it is empty.
I think I can create on by uploading a zip file. But what should I put inside the zip file? What sort of directory structure is Lambda expecting?

