Modify Auto Scaling Health Check setting for Elastic Beanstalk Enviornment

0

Hi I have been go through the documentation for update the "AWS:AutoScaling:AutoSclaingGroup" in my existing EB Environment. My current environment is setup using Docker-compose.yml file to refer to the default .env file. I decided to go with update environment setting through AWS CLI. But i keep getting the error as below.

aws elasticbeanstalk update-environment --environment-name Testenv-env --template-name v1

An error occurred (ConfigurationValidationException) when calling the UpdateEnvironment operation: Configuration validation exception: Invalid option specification (Namespace: 'aws:autoscaling:autoscalinggroup', OptionName: 'HealthCheckType'): Unknown configuration setting.

In my v1.json file, I have the setup in below

  aws:autoscaling:autoscalinggroup:
    HealthCheckType: ELB

Then I researched online a bit, found ppl are discussing this is no longer working, and I checked the latest API documentation, which is conflicting from the instruction in below link. Apparent "HealthCheckType" is no longer in the Support field for EB. Then I turned to another solution mentioned in below link: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environmentconfig-autoscaling-healthchecktype.html It suggested that I use the autoscaling.config in the .ebextensions folder. However I found quite not clear instruction to how to use the .ebextensions folder with my current environment setup where I use docer-compose to refer to the default .env file when deploying. Can someone help in pointing to me a clear instruction.

Another thought is, since the environment already exist, if I directly go to the ASG group in my environment, and update from there, would new deployment (with upgrade version) into my EB environment override this ASG change each time I do upgrade? Or the change will be honored and kept in the ASG group as long as it was not deleted.

1 Answer
0

Beanstalk creates a number of managed resources for your environment. For a web server environment the auto scaling group attached to your environment maps to the resource AWSEBAutoScalingGroup. Refer to modifying the resources that Elastic Beanstalk creates for your environment for further info.

You can modify the AWSEBAutoScalingGroup resource through use of an ebextension as you called out in the link auto Scaling health check setting.

Place your configuration file in a single folder, named .ebextensions, in the root of your source bundle. Configuration files must have the .config file extension and must conform to YAML or JSON specifications.

When you generate the deployment package make sure you include the .ebextensions folder

RoB
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions