0
0
AWScloud~30 mins

Scaling policies (target tracking, step, simple) in AWS - Mini Project: Build & Apply

Choose your learning style9 modes available
Scaling policies (target tracking, step, simple)
📋 What You'll Learn
💡 Why This Matters
🌍 Real World
Auto Scaling Groups help keep web applications responsive and cost-efficient by automatically adjusting the number of servers based on demand.
💼 Career
Understanding scaling policies is essential for cloud engineers and DevOps professionals to maintain application performance and optimize resource usage.
Progress0 / 4 steps
1
Create the Auto Scaling Group and Launch Configuration

Create a launch configuration called MyAppLaunchConfig with image ID ami-12345678 and instance type t3.micro. Then create an Auto Scaling Group called MyAppASG using this launch configuration with minimum size 1, maximum size 5, and desired capacity 2.

AWS
Need a hint?

Use aws_launch_configuration and aws_autoscaling_group resources. Set the exact names and values as specified.

2
Add Target Tracking Scaling Policy

Add a target tracking scaling policy named CPU50Percent to MyAppASG that keeps the average CPU utilization at 50%. Use the predefined metric ASGAverageCPUUtilization.

AWS
Need a hint?

Use aws_autoscaling_policy with policy_type = "TargetTrackingScaling" and set target_value to 50.

3
Add Step Scaling Policy to Increase Capacity

Add a step scaling policy named ScaleUpHighCPU to MyAppASG that increases capacity by 2 when CPU usage exceeds 70%. Use a CloudWatch alarm named HighCPUAlarm that triggers when average CPU is above 70%.

AWS
Need a hint?

Create a CloudWatch alarm for CPU > 70%. Then create a step scaling policy linked to this alarm that increases capacity by 2.

4
Add Simple Scaling Policy to Decrease Capacity

Add a simple scaling policy named ScaleDownLowCPU to MyAppASG that decreases capacity by 1 when CPU usage falls below 30%. Use a CloudWatch alarm named LowCPUAlarm that triggers when average CPU is below 30%.

AWS
Need a hint?

Create a CloudWatch alarm for CPU < 30%. Then create a simple scaling policy linked to this alarm that decreases capacity by 1.