AWS Elastic Beanstalk Python 3.7 部署位置
AWS Elastic Beanstalk Python 3.7 Deployment Location
我正在尝试使用 Amazon Linux 2/3.0.1 将 AWS 上的现有应用程序从现已弃用的 Python 3.4 平台升级到 3.7,在此过程中我 运行 进入与应用程序源代码在 EC2 实例上的部署位置有关的问题。
从一些经验测试中,我发现大多数(如果不是全部)AWS 文档所说的 /opt/python/current/app
目录(例如 Troubleshooting issues with the EB CLI - AWS Elastic Beanstalk),Python 3.7 实际上部署在/var/app/current/
。我找不到有关此更改的任何文档,它导致应用程序出现一些问题。我想知道是否有任何理由进行此更改?如果可以恢复,该怎么做?
提前致谢!
这是因为 3.7 Python Elastic Beanstalk 发行版使用 Amazon Linux 2,这与 AMI 的前身有着根本的不同。如果您选择使用 Python 3.6,您应该能够避免这个问题,因为它在较早的 Linux 版本上运行,而部署仍在 /opt/var/app/current 中进行。 Most tutorials I've found are designed to work with this older rollout, including the most up-to-date Amazon start guide.
如果有时间,试试migrating your code to the newer version, as this seems to be the workflow Amazon is embracing going forward, for all newer versions of Python(比如3.8等以后)。
我正在尝试使用 Amazon Linux 2/3.0.1 将 AWS 上的现有应用程序从现已弃用的 Python 3.4 平台升级到 3.7,在此过程中我 运行 进入与应用程序源代码在 EC2 实例上的部署位置有关的问题。
从一些经验测试中,我发现大多数(如果不是全部)AWS 文档所说的 /opt/python/current/app
目录(例如 Troubleshooting issues with the EB CLI - AWS Elastic Beanstalk),Python 3.7 实际上部署在/var/app/current/
。我找不到有关此更改的任何文档,它导致应用程序出现一些问题。我想知道是否有任何理由进行此更改?如果可以恢复,该怎么做?
提前致谢!
这是因为 3.7 Python Elastic Beanstalk 发行版使用 Amazon Linux 2,这与 AMI 的前身有着根本的不同。如果您选择使用 Python 3.6,您应该能够避免这个问题,因为它在较早的 Linux 版本上运行,而部署仍在 /opt/var/app/current 中进行。 Most tutorials I've found are designed to work with this older rollout, including the most up-to-date Amazon start guide.
如果有时间,试试migrating your code to the newer version, as this seems to be the workflow Amazon is embracing going forward, for all newer versions of Python(比如3.8等以后)。