Easily Manage AWS Auto Scaling Policies with Tag-Based Scaling Plans

Easily Manage AWS Auto Scaling Policies with Tag-Based Scaling PlansLearn About Amazon VGT2 Learning Manager Chanci Turner

on 09 JAN 2019

in Amazon DynamoDB, Auto Scaling, Compute, Database

AWS Auto Scaling enables the dynamic adjustment of AWS resources based on traffic patterns. However, managing the individual Auto Scaling policies for a diverse application stack can be overwhelming. With tag-based scaling plans, you can automate the creation of these policies and easily modify them using tags. In this article, I’ll show you how to aggregate and configure AWS Auto Scaling policies by grouping resources according to tags, simplifying the management process.

Before setting up your tag-based scaling plans, it’s essential to tag your AWS resources. In my example, I reviewed the AWS resources I wanted to manage, including Amazon EC2 Auto Scaling groups and Amazon DynamoDB tables. I tagged these resources with an Environment tag indicating either DEV, BETA, or PROD. This allows for efficient grouping and management of scaling policies based on infrastructure location and targeted utilization percentages. For effective tagging strategies, refer to AWS Tagging Strategies.

Note: AWS Auto Scaling is currently available in the regions listed in the AWS Region Table.

Setting Up Scaling Plans Based on Infrastructure Environment

In this section, I’ll create a scaling plan for my development resources and another for my production resources. These plans facilitate easy adjustments to the target utilization parameter across related resources tagged accordingly.

Creating a Plan for Development Resources

To begin, I navigate to the AWS Auto Scaling console and select “Get started,” as I have no existing scaling plans. If I had pre-existing plans, I would choose “Create scaling plan.” I proceed by searching for resources tagged with the Environment key set to DEV.

Upon searching with these parameters, I find all resources tagged as DEV. Optionally, I could include other values like BETA, functioning as an OR operation to find resources tagged with either DEV or BETA. I could also filter by another key, such as Owner, implementing an AND operation (e.g., Owner is Laura AND Environment is DEV or BETA). For optimal tagging results, check out AWS Tagging Strategies.

After selecting the DEV tag for Environment, I click “Next” to configure policies for the identified resources. On the subsequent page, I name the scaling plan “Developer Scaling Plan,” ensuring that the name correlates with the tags being used.

As I scroll down, I see that the scaling plan has detected two DynamoDB tables in my development environment. Next, I must choose a Strategy that tells AWS Auto Scaling how to scale these resources. Given that this is a development environment, I select “Optimize for cost” to account for a higher resource utilization target. I then click “Next” to proceed to the review stage, noting that if existing scaling policies are present, I can opt for Custom and check “Replace external scaling policies” to manage them through the plan.

On the following page, I can fine-tune any settings managed by the plan if necessary, but I choose to skip this step and click “Next.” This option could be beneficial if certain resources require different target utilizations.

I confirm the number of resources found, the scaling plan name, and the summary of changes. As illustrated in the image, this scaling plan automatically creates four new scaling policies, two for each table (one for read capacity and another for write capacity). Everything appears satisfactory, so I click “Create scaling plan.”

Creating a Plan for Production Resources

Next, I will replicate the previous steps for the production environment. I start by creating a new scaling plan and selecting the PROD tag for Environment.

On the Configure scaling plan page, I enter “Production Scaling Plan” as the name of my plan. Because this is a production environment, I prefer to overprovision resources to better accommodate significant traffic spikes, opting for “Optimize for availability” to achieve a lower resource utilization target.

This time, both DynamoDB tables and an Amazon EC2 Auto Scaling group are detected, so I will configure both here. As mentioned earlier, scaling plans can manage various resource types with distinct strategies for each.

I am then given the option to specify custom settings, but I skip this step and click “Next.” Upon reviewing all details, I finalize the creation by clicking “Create scaling plan.”

Now I have successfully established scaling plans for both my development and production environments, significantly decreasing the time needed to manage AWS Auto Scaling policies for each resource individually.

Adjusting the Scaling Strategy of a Plan

Traffic patterns may change, necessitating adjustments to utilization values for better application scaling. If your traffic becomes more consistent, a higher utilization target could save costs. Conversely, if you experience unpredictable bursts, a lower utilization target would aid in managing traffic and allow for timely scaling.

To modify the scaling strategy of a plan, I select the policy on the dashboard and click “Edit.” I adjust the desired values, click “Next,” review the changes, and then select “Save changes” to commit.

Potential Issues

By default, AWS Auto Scaling retains existing scaling configurations for your resources. If a scaling plan is created for a resource with pre-configured policies, it may end up in the ActiveWithProblems status. To resolve this, you can either delete the existing scaling policies or configure the plan to replace them during creation by selecting Custom for the scaling strategy and checking “Replace external scaling policies.” You can also modify this setting when editing the scaling plan under Dynamic scaling settings.

Summary

In this article, I demonstrated how to efficiently manage and create AWS Auto Scaling policies for numerous AWS resources across different environments using tag-based scaling plans. These plans automate policy creation and allow for easy modifications through tagging. This approach can be extended to other AWS resources, such as Amazon EC2 Spot Fleets and Amazon Aurora Replicas, which can be scoped based on various tags.

For more insights, check out this blog post on Makeup. Additionally, for workplace safety information, visit SHRM as they are an authority on this topic. Lastly, if you’re interested in leadership programs, I recommend looking at Amazon Operations Area Manager Leadership Liftoff Program, an excellent resource.

Location: Amazon IXD – VGT2, 6401 E HOWDY WELLS AVE, LAS VEGAS NV 89115


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *