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?

4
  • Which language SDK are you using for AWS? Commented Mar 19, 2020 at 20:54
  • I use the Java and Ruby SDKs. Commented Mar 19, 2020 at 20:55
  • 1
    Request you to create an AWS ticket. I have worked enough with AWS to know that they might have missed releasing an SDK change for this. Commented Mar 19, 2020 at 21:25
  • 1
    Thanks for the suggestion, Rajan. I found a solution, posting it right now. Commented Mar 20, 2020 at 0:51

1 Answer 1

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.

1
  • 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
    Commented Aug 8, 2022 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.