aws / aws-lambda-python-runtime-interface-client

Apache License 2.0
263 stars 75 forks source link

[ERROR] Runtime.ImportModuleError: Unable to import module 'solution.inference.lambda_app': No module named 'inference' #29

Open tiru1930 opened 3 years ago

tiru1930 commented 3 years ago

running below command

docker run -d -v ~/.aws-lambda-rie:/aws-lambda -p 9000:8080 \
    --entrypoint /aws-lambda/aws-lambda-rie \
    xxxx.dkr.ecr.region.amazonaws.com/test-td-inference/5f0b5bec-9547-44e8-afb6-589a9c6f7e2e:question_answering-transformers_bert-lambda-6408082c-5c2e-412b-b4c6-1d3e5295bbe6 \
        /usr/local/bin/python -m awslambdaric solution.inference.lambda_app.handle

in side container

i am able to do this

python -c "import solution.inference.lambda_app"

but when i use

http://localhost:9000/2015-03-31/functions/function/invocations

it says

{"errorMessage": "Unable to import module 'solution.inference.lambda_app': No module named 'inference'", "errorType": "Runtime.ImportModuleError"