dwyl / learn-aws-lambda

✨ Learn how to use AWS Lambda to easily create infinitely scalable web services
1.05k stars 202 forks source link

Elasticsearch-py package modules not detected in lambda #115

Closed cjvegi closed 5 years ago

cjvegi commented 5 years ago

Hi,

I have a function which uses elasticsearch-py package. I am using cloud9 to create a lambda function where I installed elasticsearch package within the project directory using "pip install elasticsearch -t . " When I am trying to run the function Lambda(Local), i am receiving the following error.

image

Project Directory: image

function:

from elasticsearch import Elasticsearch

def lambda_handler(event, context):

TODO implement

return ''

Any help on this is highly appreciated.

cjvegi commented 5 years ago

Realized that the package should be one up above.