aws / aws-lambda-base-images

Apache License 2.0
648 stars 107 forks source link

AWS Lambda Runtime python3.8 missing libraries #20

Open umairrahmad opened 2 years ago

umairrahmad commented 2 years ago

I wanted to upgrade my python lambda from version 3.7 to 3.8, when I did so I ran into missing libraries, specifically

image

My Python lambda function makes use of subprocess to run shell commands. Before upgrading to 3.8 everything worked fine.

I dived deep into the issue at hand, I read that amazon linux 2 is used for runtime python3.8, so I locally created a container and tried to do what I was doing via lambda on console and things worked fine, I also created the python3.8 base image following this repo created its container and replicated the same thing and it worked fine.

It got confusing that, what worked for same runtime locally didn't work on console.

So locally I found the path for libreadline.so.6 find / -name libreadline.so.6

found it under /lib64 and /usr/lib64

The final thing I did was to list out the output of these directories on lambda function (running in console)

image

image

In it's output, there was no libreadline.so.6, Now I'm fully confused that why I am experiencing this inconsistency, locally and on console.

Any comment or help would be appreciated :)

Anku1024 commented 3 months ago

any solution?