Closed jneves closed 5 months ago
Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed.
Hi there! Unfortunately, this Issue was automatically closed as it had not seen any activity in at least 100 days. If the Issue is still relevant to the latest version of Zappa, please open a new Issue.
Originally from: https://github.com/Miserlou/Zappa/issues/1923 by dughibot
Context
We've been using zappa deploy our code. We're using the
slim_handler
setting because our code with all of its requirements is somewhat large. We've been having issues getting a certain library (xmlsec) to load properly. In order to get around this issue, we started runningzappa package
, updating the zip file to include the required dependencies for the xmlsec library, then runningzappa update
. However, we've found that this won't update our application code. When runningzappa update -z myapp_handler.zip
, we find that the tar file with our application code is not uploaded to s3, which means we have to upload it as a separate step in the deploy process.Expected Behavior
zappa update
should upload new application code to s3 for the handler to pull in.Actual Behavior
zappa update
just uploads the new handler zip, and not the application code archivePossible Fix
It might be that it's ambiguous as to what the package that
zappa update
should upload sincezappa package
creates both a zip and a tar file whenslim_handler
is set to true, in which case, maybe there should be an option forzappa update
that allows us to specify the archive fileSteps to Reproduce
With slim_handler set to true in zappa_settings.json:
zappa deploy dev
zappa package -o myapp_handler.zip dev
zappa update dev -z myapp_handler.zip
zappa deploy
, not thezappa update
.Your Environment
pip freeze
:$ pip freeze airtable-python-wrapper==0.11.3 alembic==1.0.0 amazon-dax-client==1.0.6 aniso8601==4.0.1 antlr4-python3-runtime==4.7 argcomplete==1.9.3 asn1crypto==0.24.0 atomicwrites==1.2.1 attrs==18.2.0 aws-sam-translator==1.12.0 aws-xray-sdk==0.95 base58==1.0.0 bcrypt==3.1.7 Beaker==1.10.1 blinker==1.4 boto==2.49.0 boto3==1.9.191 botocore==1.12.191 certifi==2018.8.24 cffi==1.11.5 cfn-flip==1.0.3 cfn-lint==0.22.3 chardet==3.0.4 click==6.7 coverage==4.5.2 cryptography==2.4.2 DateTime==4.3 defusedxml==0.6.0 docker==3.7.0 docker-pycreds==0.4.0 docutils==0.14 durationpy==0.5 ecdsa==0.13 Flask==1.0.2 Flask-Bcrypt==0.7.1 Flask-Cors==3.0.7 Flask-HTTPAuth==3.2.4 Flask-JWT-Extended==3.15.0 Flask-Migrate==2.3.1 Flask-RESTful==0.3.6 Flask-SQLAlchemy==2.3.2 freeze==1.0.10 freezegun==0.3.11 future==0.16.0 hjson==3.0.1 idna==2.7 importlib-metadata==0.18 isodate==0.6.0 itsdangerous==0.24 Jinja2==2.10.1 jmespath==0.9.3 jsondiff==1.1.2 jsonpatch==1.23 jsonpickle==1.1 jsonpointer==2.0 jsonschema==3.0.1 kappa==0.6.0 lambda-packages==0.20.0 lxml==4.4.1 Mako==1.0.7 MarkupSafe==1.0 marshmallow==3.0.0rc3 mock==2.0.0 more-itertools==4.3.0 moto==1.3.13 numpy==1.16.1 oic==1.0.1 packaging==19.0 pandas==0.24.1 passlib==1.7.1 pbr==5.1.2 phonenumbers==8.10.12 Pillow==5.4.1 pkgconfig==1.5.1 placebo==0.8.2 pluggy==0.7.1 prometheus-client==0.6.0 psycopg2==2.7.5 psycopg2-binary==2.7.7 py==1.6.0 pyaml==18.11.0 pycparser==2.19 pycryptodome==3.7.3 pycryptodomex==3.8.2 pyjwkest==1.4.2 PyJWT==1.6.4 pynamodb==4.0.0b3 pyparsing==2.4.0 pyrsistent==0.15.3 pytest==4.3.0 pytest-cov==2.6.1 pytest-mock==1.10.4 python-dateutil==2.7.3 python-editor==1.0.3 python-http-client==3.1.0 python-jose==2.0.2 python-slugify==1.2.4 python3-saml==1.7.0 pytz==2018.7 PyYAML==5.1.1 requests==2.21.0 responses==0.10.5 s3transfer==0.2.0 sendgrid==6.0.5 sentry-sdk==0.7.13 six==1.11.0 SQLAlchemy==1.2.12 sshpubkeys==3.1.0 timeout-decorator==0.4.1 toml==0.9.6 tqdm==4.19.1 troposphere==2.3.3 typing-extensions==3.7.4 Unidecode==1.0.22 urllib3==1.23 wcwidth==0.1.7 websocket-client==0.55.0 Werkzeug==0.14.1 wrapt==1.11.1 wsgi-request-logger==0.4.6 xmlsec==1.3.3 xmltodict==0.12.0 zappa==0.48.2 zipp==0.5.2 zope.interface==4.6.0
zappa_settings.py
: I removed the events, certificate arn, and vpc config fields since they seemed like they'd be irrelevant. I can specify them though if it would help.