0
0
AWScloud~30 mins

Predictive scaling overview in AWS - Mini Project: Build & Apply

Choose your learning style9 modes available
Predictive Scaling Overview with AWS Auto Scaling
📖 Scenario: You manage a web application hosted on AWS. Traffic to your app changes predictably during the day. You want to prepare your servers to handle these changes automatically without manual intervention.
🎯 Goal: Build a simple AWS Auto Scaling configuration that uses predictive scaling to adjust the number of servers ahead of traffic changes.
📋 What You'll Learn
Create an Auto Scaling group with a launch template
Define a predictive scaling policy for the Auto Scaling group
Set a target tracking scaling policy for comparison
Verify the Auto Scaling group has predictive scaling enabled
💡 Why This Matters
🌍 Real World
Predictive scaling helps cloud applications automatically adjust resources before traffic spikes, improving performance and cost efficiency.
💼 Career
Cloud engineers and DevOps professionals use predictive scaling to optimize infrastructure and maintain application availability.
Progress0 / 4 steps
1
Create an Auto Scaling group with a launch template
Write AWS CLI commands to create a launch template named MyLaunchTemplate with the latest Amazon Linux 2 AMI and instance type t3.micro. Then create an Auto Scaling group named MyAutoScalingGroup using this launch template, with minimum size 1, maximum size 5, and desired capacity 1.
AWS
Need a hint?

Use aws ec2 create-launch-template with --launch-template-data JSON to specify AMI and instance type. Then use aws autoscaling create-auto-scaling-group referencing the launch template.

2
Define a predictive scaling policy for the Auto Scaling group
Write an AWS CLI command to create a predictive scaling policy named MyPredictiveScalingPolicy for the Auto Scaling group MyAutoScalingGroup. Set the policy type to PredictiveScaling and configure it to maintain a target capacity of 70 percent of the forecasted load.
AWS
Need a hint?

Use aws autoscaling put-scaling-policy with --policy-type PredictiveScaling and specify --predictive-scaling-configuration JSON with TargetCapacity.

3
Add a target tracking scaling policy for comparison
Write an AWS CLI command to create a target tracking scaling policy named MyTargetTrackingPolicy for the Auto Scaling group MyAutoScalingGroup. Set the target value to 50 percent CPU utilization.
AWS
Need a hint?

Use aws autoscaling put-scaling-policy with --policy-type TargetTrackingScaling and specify --target-tracking-configuration JSON with CPU utilization metric and target value.

4
Verify the Auto Scaling group has predictive scaling enabled
Write an AWS CLI command to describe the scaling policies for MyAutoScalingGroup and confirm that MyPredictiveScalingPolicy exists with type PredictiveScaling.
AWS
Need a hint?

Use aws autoscaling describe-policies with the Auto Scaling group name to list all policies.