AWS Config Rule: Autoscaling Capacity Rebalancing

AUTOSCALING_CAPACITY_REBALANCING

Ryan Ware

Last Update há 6 meses

Description: Checks if Capacity Rebalancing is enabled for Amazon EC2 Auto Scaling groups that use multiple instance types. The rule is NON_COMPLIANT if Capacity Rebalancing is not enabled.


Trigger type: Configurational Changes


AWS Region: All supported AWS regions except China (Beijing), Asia Pacific (Jakarta), Middle East (UAE), Asia Pacific (Hyderabad), Asia Pacific (Melbourne), AWS GovCloud (US-East), AWS GovCloud (US-West), Israel (Tel Aviv), Europe (Spain), China (Ningxia), Europe (Zurich) Region


How to Resolve Manually

This AWS Config Rule simply checks if an existing Auto Scaling Groups have capacity rebalancing enabled. This is quite a niche AWS Config Rule however so it will only apply to your Auto Scaling Groups if you meet both the following requirements;


  • Your Auto Scaling Group is using EC2 Spot Instances
  • Your Auto Scaling Group is making use of multiple instance types


To clarify what multiple instance types are, please see this image below. Here we can see an edited Auto Scaling Group configuration where we are specifying the instance type requirement. Notice here how we have more than one instance size selected.

For a full documented method to create Auto Scaling Groups with multiple instance types and purchase options, please follow the AWS Documentation guide here


When editing your Auto Scaling Group and you have ensured that you have multiple instance types selected as per the image above - we will need to configure a couple of extra options within your ASG to make your group compliant with this particular AWS Config Rule.


Firstly, we need to ensure that your ASG is distributing at least some percentage to Spot Instances, or it could be all Spot Instances. We cannot have 100% On-Demand EC2 Instances.


Secondly, in our Allocation Strategies we will need to ensure that the spot allocation strategy is set to Capacity Optimized. This is the default option. You will also see that selecting this option gives us the possibility to ensure that Capacity Rebalance is selected.


If this is selected as seen in the image below - congratulations! Your Auto Scaling Group is now compliant with this particular AWS Config Rule


Want to know more about StackZone and how to make your cloud management simple and secure?

Check our how it works section with easy to follow videos or just create your own StackZone Account here

Was this article helpful?

0 out of 0 liked this article

Still need help? Message Us