忽略4xx增强型运行状况规则会导致AWS EB控制台配置页面错误

问题描述 投票:0回答:1

按照Configuring Enhanced Health Rules Using a Config Document上的说明使用“.ebextensions / YAML / JSON”方法忽略应用程序HTTP 4xx错误,具体而言,“.ebextensions / 00_option_settings.config”中添加了以下内容:

  - namespace: aws:elasticbeanstalk:healthreporting:system
    option_name: ConfigDocument
    value: {
      "Rules": {
        "Environment": {
          "Application": {
            "ApplicationRequests4xx": {
              "Enabled": false
            }
          }
        }
      },
      "Version": 1
    }

使用此配置,部署到弹性beanstalk成功并且似乎具有所需效果,但是当访问env的“配置”页面(即EB控制台中的“https://console.aws.amazon.com/elasticbeanstalk/home?region=us-east-1#/environment/dashboard?applicationName=my-app&environmentId=e-12345678”)时,会发生错误:

enter image description here

我试过引用/转义YAML中嵌入的JSON,但没有效果。

从命令行,eb config工作正常:

  aws:elasticbeanstalk:healthreporting:system:
    ConfigDocument: '{"Version":1,"Rules":{"Environment":{"Application":{"ApplicationRequests4xx":{"Enabled":false}}}}}'
    HealthCheckSuccessThreshold: Ok
    SystemType: enhanced
amazon-web-services elastic-beanstalk amazon-elastic-beanstalk
1个回答
1
投票

我看起来像这样,它正常工作。

option_settings:
  - namespace: aws:elasticbeanstalk:healthreporting:system
    option_name: ConfigDocument
    value: {"Rules": {"Environment": {"Application": {"ApplicationRequests4xx": {"Enabled": false}}}},"Version": 1}
© www.soinside.com 2019 - 2024. All rights reserved.