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!!
No module named 'packageretry'indicates a typo in your actual code.