Miserlou / Zappa

Serverless Python
https://blog.zappa.io/
MIT License
11.89k stars 1.21k forks source link

Cannot find libxmlsec1.so.1 in AWS Lambda python3.8 environment #2239

Closed emontgomerydae closed 1 year ago

emontgomerydae commented 1 year ago

I'm not sure if this is the best place for this, but trying to get some help solving an issue I'm running into.

(I'm knew to zappa and django).

I'm using zappa to deploy to AWS lambda and running into an issue where i get the following error when my function runs in Lambda:

Traceback (most recent call last):
File "/var/task/rest_framework/settings.py", line 177, in import_from_string
return import_string(val)
File "/var/task/django/utils/module_loading.py", line 30, in import_string
return cached_import(module_path, class_name)
File "/var/task/django/utils/module_loading.py", line 15, in cached_import
module = import_module(module_path)
File "/var/lang/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/var/task/apps/authentication/auth.py", line 1, in <module>
from my_django.authentication.auth import JWTAuthenticationBase
File "/var/task/my_django/authentication/auth.py", line 3, in <module>
from onelogin.saml2.auth import OneLogin_Saml2_Auth
File "/var/task/onelogin/saml2/auth.py", line 12, in <module>
import xmlsec
ImportError: libxmlsec1.so.1: cannot open shared object file: No such file or directory

Context

The AWS Lambda runtime environment is Python3.8. The packaging is happening using AWS codebuild with python3.8 installed.

Expected Behavior

I'm hoping that lambda can find the libxmlsec1.so.1 file

Actual Behavior

See above stack trace

Your Environment

souravjamwal77 commented 1 year ago

Hi @emontgomerydae the new official Zappa repo is here. Can you please close this issue and create an issue on the new official Zappa repo?

emontgomerydae commented 1 year ago

Thanks!