Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for switching to using Docker containers needs more clarification #1341

Open
pcolmer opened this issue Jul 18, 2024 · 2 comments
Labels
needs-review Needs attention from a maintainer

Comments

@pcolmer
Copy link

pcolmer commented Jul 18, 2024

I've recently switched from using Zappa to handle the entire deployment, to using a Docker container.

The documentation links to https://ianwhitestone.work/zappa-serverless-docker/ for further details of how this works and how to use it. That article says "Our zappa_settings.json is pretty minimal, and no different from the zappa_settings you’re used to. The only thing worth mentioning is you don’t need to specify a Python runtime since that will be set in the Docker image."

What I have discovered, however, is that if the Zappa settings file specifies slim_handler then the exported Python settings file includes a value for ARCHIVE_PATH which, in turn, means that when the Lambda fires up, the handler checks for ARCHIVE_PATH and, if it is defined, tries to load the archive from S3.

That archive is left behind if you undeploy/deploy ... and it also means that the handler loads what could be old code.

I only discovered this by undeploying, completely wiping everything out, re-deploying and then getting handler errors in CloudWatch because it couldn't load the archive. I then had to dig into the source code to figure out why there was an ARCHIVE_PATH being set.

There are a couple of improvements I would suggest:

  1. When deploying/updating with -d, check the settings file for any settings that could get in the way of a Docker deployment.
  2. When undeploying, remove the archive from the S3 bucket.
  3. Update the documentation to make it clearer which settings should NOT be used if deploying with Docker.

Thank you :)

Copy link

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.

@github-actions github-actions bot added the no-activity [Bot] Closing soon if no new activity label Oct 16, 2024
@pcolmer
Copy link
Author

pcolmer commented Oct 16, 2024

Has this been fixed? There isn't a link to a PR so I'm guessing not ... ?

@github-actions github-actions bot added needs-review Needs attention from a maintainer and removed no-activity [Bot] Closing soon if no new activity labels Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review Needs attention from a maintainer
Projects
None yet
Development

No branches or pull requests

1 participant