【发布时间】:2019-05-01 13:52:19
【问题描述】:
我有一个带有以下 Elastic Beanstalk 环境的 Cloudformation 模板:
Resources:
BeanstalkEnvironment1:
Type: AWS::ElasticBeanstalk::Environment
Properties:
ApplicationName: Application1
Description: ignored
EnvironmentName: Environment1'
SolutionStackName: '64bit Amazon Linux 2017.03 v2.5.0 running Python 3.4'
我的主要目标是将环境的 Python 版本从 3.4 更新到 3.6。我能够使用以下命令更新解决方案堆栈名称(取自 this answer)
aws elasticbeanstalk update-environment --solution-stack-name "64bit Amazon Linux 2018.03 v2.7.6 running Python 3.6" --environment-name "Environment1"
但是,如果我将现有模板更新为新的解决方案堆栈名称,我将无法使用现有模板进行后续更新,因为我得到“Cannot update a stack when a custom-named resource requires replacing”。如果我保留原始版本,它可以工作,但我希望让正在运行的平台与模板保持同步。
有什么想法吗?
谢谢!
【问题讨论】:
标签: python python-3.x amazon-web-services amazon-cloudformation amazon-elastic-beanstalk