Elastic Beanstalk error after migrating from python 3.7 to python3.8.

0

I am using the EB platform: Python 3.7 AL2 version 3.3.11, and all is working fine.

But, the troubleshooting comes when I try to upgrade both to a newer AL2 version (3.3.12) and to a newer Python version (3.8). The error happens on the "[app-deploy] - [StageApplication]":

eb-engine:

022/04/20 11:51:08.170326 [INFO] Executing instruction: StageApplication
2022/04/20 11:51:08.171215 [INFO] extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/
2022/04/20 11:51:08.171232 [INFO] Running command /bin/sh -c /usr/bin/unzip -q -o /opt/elasticbeanstalk/deployment/app_source_bundle -d /var/app/staging/
2022/04/20 11:51:08.208452 [INFO] finished extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/ successfully
2022/04/20 11:51:08.212657 [ERROR] An error occurred during execution of command [app-deploy] - [StageApplication]. Stop running the command. Error: chown /var/app/staging/venv/dev/lib/python3.8/collections: no such file or directory 

The error specifically says:

[ERROR] An error occurred during execution of command [app-deploy] - [StageApplication]. Stop running the command. Error: chown /var/app/staging/venv/dev/lib/python3.8/collections: no such file or directory

I don't know why it goes there, instead of /var/app/venv/staging-LQM1lest/lib/python3.8 that is where I think it should go and where it is the virtual environment.

I can assure that the local /venv folder is ignored when deploying (following this related question https://stackoverflow.com/questions/61805345/aws-elastic-beanstalk-chown-pythonpath-error). Said that though, after connecting to the instance by ssh, I can see a venv folder in /var/app/staging/ containing a pyton3.8 sub folder. I am curious to know why this happens and what can I be doing wrong in the process

Thanks in advance!

llpujol
質問済み 2年前1632ビュー
1回答
0
承認された回答

Already solved. In my local venv, python 3.8 added symlinks, that are not ignored by .ebignore (that is a bug of awsebcli). The are several workarounds, but the issue is exactly this. see: https://github.com/aws/aws-elastic-beanstalk-cli/issues/69

llpujol
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ