2

The latest AWS Elastic Beanstalk (EB) console has, under each environment health configuration, a new option to ignore load balancer 4xx errors:

AWS EB environment configuration, health monitoring tab

This same option doesn't appear on the previous AWS console version, only on the latest.

I'm trying to enable this option through code, but I can't find any docs for it. I'm already enabling the "Ignore application 4xx" option through .ebextensions.

I already did this:

Any idea on how to configure it by code? Maybe AWS forgot to hide that option on the latest console?

david-ojeda
  • 344
  • 1
  • 10

1 Answers1

3

I found the name of the configuration by:

  1. Updating the configuration once from the AWS console for any environment.
  2. Saving that configuration as an Elastic Beanstalk Saved Configuration.
  3. Retrieving the just saved configuration with the EB CLI.

The configuration document I got back looks like this:

{
  "Rules": {
    "Environment": {
      "ELB": {
        "ELBRequests4xx": {
          "Enabled": false
        }
      },
      "Application": {
        "ApplicationRequests4xx": {
          "Enabled": false
        }
      }
    }
  }
}

I can now use this JSON as a ConfigDocument on my .ebextension .config file and it works!

I also documented the whole process here.

david-ojeda
  • 344
  • 1
  • 10
  • ``Alert: The platform version that your environment is using isn't recommended. There's a recommended version in the same platform branch.`` Issue I am getting.. – Snerd Aug 08 '22 at 22:00