1

I have done pip install --target ./package retry and then packaged my code and ./package folder in to a zip and uploaded it to AWS lambda. However, from package.retry import retry results in :

{ "errorMessage": "Unable to import module 'lambda_function_update_error_table': No module named 'packageretry'", "errorType": "Runtime.ImportModuleError" }

But, if the retry folder which is installed through pip is in root directory, from retry import retry works fine.

How can I solve this issue? Thanks in advance!!

2
  • Check if that version of python the package is available. If not, use a different version of Python or look for alternatives. Commented Mar 10, 2021 at 16:29
  • I suspect No module named 'packageretry' indicates a typo in your actual code. Commented Mar 11, 2021 at 18:17

1 Answer 1

0

Try downloading the .whl file and then after manually extracting it again zip it with your lambda code. now once you deployment package is ready upload it to the Lambda function and then try again.

you can get the .whl file form https://pypi.org/search/?q=retry

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.