【问题标题】:Update AWS Elastic Beanstalk solution stack name更新 AWS Elastic Beanstalk 解决方案堆栈名称
【发布时间】: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


    【解决方案1】:

    我遇到了同样的问题。这似乎是 Elastic Beanstalk 和 CloudFormation 的限制。在文档 (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-beanstalk-environment.html) 中,SolutionStackName 的更新显示为 Update requires: Replacement

    如果您每次更改SolutionStackName 时都更改EnvironmentName,它应该可以正常工作。

    【讨论】:

      猜你喜欢
      • 2014-07-21
      • 2020-11-21
      • 2016-09-02
      • 2015-09-12
      • 2021-12-30
      • 1970-01-01
      • 2017-11-27
      • 2015-12-29
      相关资源
      最近更新 更多