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
Zappa version used: 0.56.1
Operating System and Python version: AWS Lambda with Python3.8 runtime
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:
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
pip freeze
: argcomplete==2.0.0 asgiref==3.6.0 backports.zoneinfo==0.2.1 blinker==1.5 boto==2.49.0 boto3==1.26.47 botocore==1.29.47 certifi==2022.12.7 cfn-flip==1.3.0 chance==0.110 charset-normalizer==2.1.1 click==8.1.3 My-Django-Core==3.0.1 Django==4.1.5 django-cors-headers==3.13.0 django-cors-middleware==1.5.0 django-elasticsearch-dsl==7.2.2 django-elasticsearch-dsl-drf==0.22.5 django-enumfield==3.0 django-extensions==3.2.1 django-filter==22.1 django-mysql==4.8.0 django-nine==0.2.7 django-s3-storage==0.13.11 django-split-settings==1.2.0 django-storages==1.13.2 djangorestframework==3.14.0 djangorestframework-filters==1.0.0.dev2 djangorestframework-recursive==0.1.2 djangorestframework-simplejwt==5.2.2 drf-nested-routers==0.93.4 drf-writable-nested==0.7.0 durationpy==0.5 dynamodb-json==1.3 elasticsearch==7.1.0 elasticsearch-dsl==7.4.0 hjson==3.1.0 idna==3.4 importlib-metadata==6.0.0 isodate==0.6.1 jmespath==1.0.1 kappa==0.6.0 lxml==4.9.2 Markdown==3.4.1 MarkupSafe==2.1.1 marshmallow==3.19.0 marshmallow-enum==1.5.1 marshmallow-pynamo-db==1.1.0 packaging==23.0 Pillow==9.4.0 pkgconfig==1.5.5 placebo==0.9.0 pydotplus==2.0.2 PyJWT==2.6.0 pynamodb==5.3.4 pynamodb-attributes==0.4.0 pyparsing==3.0.9 python-dateutil==2.8.2 python-slugify==7.0.0 python3-saml==1.15.0 pytz==2022.7 PyYAML==6.0 requests==2.28.1 requests-aws4auth==1.0.1 ruamel.yaml==0.17.21 ruamel.yaml.clib==0.2.7 s3transfer==0.6.0 simplejson==3.18.1 six==1.16.0 sqlparse==0.4.3 text-unidecode==1.3 toml==0.10.2 tqdm==4.64.1 troposphere==4.2.0 urllib3==1.26.13 Werkzeug==2.2.2 xmlsec==1.3.13 zappa==0.56.1 zipp==3.11.0zappa_settings.json
: