zappa / Zappa

Serverless Python
https://zappa.ws/zappa
MIT License
3.31k stars 363 forks source link

[Migrated] zappa update errors in docker container with AWS profile/env vars #787

Closed jneves closed 6 months ago

jneves commented 3 years ago

Originally from: https://github.com/Miserlou/Zappa/issues/1934 by SmileSydney

zappa update devin docker container errors: Warning! Couldn't get function prop-scrape-serverless-dev in ap-southeast-2 - have you deployed yet?

I get this error in either of the two scenrios:

  1. Set AWS_XXXX env vars and removed "profile_name" from zappa_settings.json.
  2. Defined "default" AWS profile and set "profile_name": "default"

Yes virtual on 3.7

Expected Behavior

Should update AWS lambda function

Actual Behavior

Warning! Couldn't get function prop-scrape-serverless-dev in ap-southeast-2 - have you deployed yet?

Possible Fix

Verbose logging would help to understand what the actual problem is

Steps to Reproduce

  1. Set environment vars on docker host (passed in in next step)
  2. docker run --rm -it -e AWS_DEFAULT_REGION="%AWS_DEFAULT_REGION%" -e AWS_ACCESS_KEY_ID="%AWS_ACCESS_KEY_ID%" -e AWS_SECRET_ACCESS_KEY="%AWS_SECRET_ACCESS_KEY%" -v "%CD%":/var/task lambci/lambda:build-python3.7 bash
  3. python -m venv aws_venv
  4. source aws_venv/bin/activate
  5. pip install -r aws_requirements.txt
  6. zappa update

Get error

Your Environment

souravjamwal77 commented 2 years ago

Hi @jneves and @SmileSydney, I think you need to point your update command to your docker image AWS ECR uri also. Read this article here

github-actions[bot] commented 7 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.

github-actions[bot] commented 6 months ago

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.