aws-secrets-manager-rotation-lambdas icon indicating copy to clipboard operation
aws-secrets-manager-rotation-lambdas copied to clipboard

Updating python enginefrom 3.7 to 3.11 Runtime.ImportModuleError

Open felixekwoge opened this issue 1 year ago • 3 comments

[ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named 'pymssql._pymssql' Traceback (most recent call last)

felixekwoge avatar Sep 13 '23 11:09 felixekwoge

Hi felix. We've been tracking a similar problem with the PostgreSQL library. Can you take a look at this article and see if it helps with the pymssql library? This is caused by the underlying C library being compiled with runtimes from an older Python library and thus not compatible with the newer versions.

https://repost.aws/knowledge-center/secrets-manager-lambda-rotation

jbct avatar Sep 18 '23 18:09 jbct

The Python 3.7 lambda runtime will begin deprecation on November 27, 2023. After that date, new lambdas cannot be created with Python 3.7. Will these examples be updated for a current python version?

https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

qswinson avatar Sep 27 '23 00:09 qswinson

Hi @qswinson - we don't distribute the Python libraries here. If you deploy new versions through Lambda's Serverless Application repo, choosing one of our rotation projects, they deploy with the 3.9 runtime.

jbct avatar Sep 27 '23 15:09 jbct