Validation Quiz - MODULE 9
This 30-question quiz allows you to validate your knowledge of Auto Scaling before moving on to the practical lab.
Question 1
What is an Auto Scaling Group (ASG)?
A) A group of Security Groups
B) A collection of EC2 instances automatically managed according to scaling rules
C) A group of users
D) A type of Load Balancer
See the answer
Answer: B
An Auto Scaling Group is a logical set of EC2 instances treated as a group for automatic scaling. The ASG maintains the desired number of instances, replaces unhealthy instances, and scales according to defined policies.
Question 2
What are the three capacity parameters of an ASG?
A) Small, Medium, Large
B) Minimum, Desired, Maximum
C) Low, Normal, High
D) Start, Running, Stop
See the answer
Answer: B
Minimum: minimum number of instances (never below). Desired: target number of instances (the ASG tries to maintain this number). Maximum: upper limit (never above). Relationship: Minimum is less than or equal to Desired, which is less than or equal to Maximum.
Question 3
What is a Launch Template?
A) A document template
B) A configuration describing how to launch EC2 instances (AMI, type, SG, etc.)
C) A deployment plan
D) A startup script
See the answer
Answer: B
The Launch Template defines all parameters for launching an instance: AMI, instance type, key pair, Security Groups, user data, EBS volumes, etc. The ASG uses this template to create identical instances. Replaces the old Launch Configuration.
Question 4
What is the difference between Launch Template and Launch Configuration?
A) None
B) Launch Template supports versioning and more features, Launch Configuration is deprecated
C) Launch Configuration is more recent
D) Launch Template is paid
See the answer
Answer: B
Launch Template is the recommended method. It supports: versioning, mix of instance types, mix On-Demand/Spot, T2/T3 unlimited. Launch Configuration is the old method, immutable and with fewer features. Migrate to Launch Template.
Question 5
What happens if an instance in an ASG fails the health check?
A) Nothing
B) The ASG terminates it and automatically launches a new one
C) An email is sent
D) The ASG stops
See the answer
Answer: B
The ASG detects unhealthy instances (via EC2 status checks or ELB health checks) and replaces them automatically. This is the self-healing feature that maintains the desired number of healthy instances.
Question 6
What types of health checks can an ASG use?
A) Only EC2
B) EC2 and/or ELB
C) Only ELB
D) Only CloudWatch
See the answer
Answer: B
EC2 health check: checks EC2 status checks (instance running, system OK). ELB health check: checks that the instance responds to Load Balancer health checks. If integrated with a LB, use ELB health check for more precise detection.
Question 7
What is the "Target Tracking" scaling policy?
A) Follow a specific target
B) Adjust capacity to maintain a metric at a target value
C) Track users
D) Achieve a cost objective
See the answer
Answer: B
Target Tracking automatically adjusts capacity to maintain a CloudWatch metric at a target value. Example: maintain CPUUtilization at 50%. The ASG scales out if CPU > 50%, scales in if CPU < 50%. Simple and effective.
Question 8
What metrics can be used with Target Tracking?
A) Only CPU
B) CPU, Network, ALB Request Count per target, custom metrics
C) Only network metrics
D) Only cost metrics
See the answer
Answer: B
Predefined metrics: ASGAverageCPUUtilization, ASGAverageNetworkIn/Out, ALBRequestCountPerTarget. You can also use custom CloudWatch metrics (e.g., queue depth, custom application metrics).
Question 9
What is the "Step Scaling" policy?
A) Step-by-step scaling
B) Different actions depending on the magnitude of the threshold breach
C) Manual scaling
D) Linear scaling
See the answer
Answer: B
Step Scaling defines different actions depending on the magnitude of the alarm. Example: +1 instance if CPU 60-70%, +2 if CPU 70-80%, +4 if CPU > 80%. Allows a proportional response to the intensity of the load.
Question 10
What is the "Simple Scaling" policy?
A) The simplest of policies
B) Waits for a scaling action to complete before triggering another
C) Constant scaling
D) No scaling
See the answer
Answer: B
Simple Scaling triggers an action when an alarm goes into ALARM, but waits for a cooldown before reacting again. Less reactive than Step or Target Tracking. Generally replaced by other policies.
Question 11
What is the "Cooldown Period"?
A) Server cooling period
B) Waiting time after a scaling action before allowing another
C) Maintenance time
D) Billing delay
See the answer
Answer: B
The cooldown (default 300s) prevents the ASG from launching/terminating too many instances quickly. After a scale out/in, the ASG waits before reacting again, allowing new instances to activate and metrics to stabilize.
Question 12
What is "Scheduled Scaling"?
A) Scaling based on a predefined schedule
B) Random scaling
C) Cost-based scaling
D) Geography-based scaling
See the answer
Answer: A
Scheduled Scaling allows you to define scaling actions at specific times. Example: increase to 10 instances every day at 8 am, reduce to 2 at night. Useful for predictable load patterns.
Question 13
When to use Scheduled Scaling vs Target Tracking?
A) Scheduled for unpredictable load, Target Tracking for predictable load
B) Scheduled for predictable patterns, Target Tracking for variable load
C) They are identical
D) Never use both together
See the answer
Answer: B
Scheduled Scaling for predictable patterns (office hours, planned events). Target Tracking to react to actual variable load. You can combine both: scheduled for the baseline, target tracking for fine adjustments.
Question 14
What is "Predictive Scaling"?
A) Weather predictions
B) Machine learning to anticipate demand and pre-scale
C) Cost predictions
D) User prediction-based scaling
See the answer
Answer: B
Predictive Scaling uses machine learning to analyze historical patterns and anticipate future demand. The ASG scales proactively before the load increases. Combine with other policies for complete coverage.
Question 15
How does an ASG distribute instances across AZs?
A) All in one AZ
B) Balanced across configured AZs for high availability
C) Randomly
D) Based on cost
See the answer
Answer: B
The ASG distributes instances evenly across configured AZs. If you have 4 instances and 2 AZs, it places 2 in each. This ensures high availability: if one AZ fails, the other has instances.
Question 16
What happens if an AZ becomes unavailable?
A) The ASG stops
B) The ASG launches additional instances in the remaining AZs
C) Nothing
D) Instances automatically migrate
See the answer
Answer: B
The ASG detects that instances in the failed AZ are unhealthy and terminates them. It then launches replacement instances in available AZs to maintain the desired capacity. This is automatic rebalancing.
Question 17
What is "Instance Warmup"?
A) Server heating
B) Time given to a new instance to initialize before counting in metrics
C) OS startup time
D) Billing delay
See the answer
Answer: B
Instance Warmup gives time for a new instance to start its application and stabilize. During this time, it does not contribute to scaling metrics to avoid cascading scale outs based on temporarily high metrics.
Question 18
What is the "Lifecycle Hook"?
A) A physical hook
B) A pause point during launch/termination to execute custom actions
C) A log
D) An HTTP webhook
See the answer
Answer: B
Lifecycle Hooks allow executing actions during the launch (e.g., install software, register with a service) or termination (e.g., deregister, save data) of an instance before it joins/leaves the group.
Question 19
What is the "Termination Policy"?
A) Account deletion policy
B) Rules for choosing which instances to terminate during a scale in
C) Terms of use
D) Log retention policy
See the answer
Answer: B
The Termination Policy defines how the ASG chooses instances to terminate during a scale in. Options: OldestInstance, NewestInstance, OldestLaunchConfiguration, ClosestToNextInstanceHour, Default (balance AZ then oldest).
Question 20
What is "Instance Protection"?
A) Antivirus
B) Prevents a specific instance from being terminated by scaling
C) Encryption
D) Firewall
See the answer
Answer: B
Instance Protection protects an instance from termination by the ASG's scale in actions. Useful for instances running long tasks. The instance can still be manually terminated or if it becomes unhealthy.
Question 21
Can you mix On-Demand and Spot instances in an ASG?
A) No
B) Yes, with a mix policy in the Launch Template or ASG
C) Only with a Launch Configuration
D) Only for large instances
See the answer
Answer: B
The ASG supports a mix of On-Demand and Spot instances. You can define a percentage (e.g., 70% Spot, 30% On-Demand base). This reduces costs while maintaining a guaranteed base capacity.
Question 22
What are Spot instances?
A) Special instances
B) Instances using AWS's unused capacity at a reduced price, but can be interrupted
C) Free instances
D) Instances for development only
See the answer
Answer: B
Spot instances use excess EC2 capacity at a reduced price (up to 90% cheaper). They can be interrupted by AWS with a 2-minute notice when AWS needs the capacity. Ideal for workloads tolerant to interruptions.
Question 23
How to protect against Spot interruptions?
A) It's not possible
B) Diversify instance types and AZs, use a mix of On-Demand/Spot
C) Pay more
D) Use Reserved Instances
See the answer
Answer: B
For Spot resilience: diversify instance types (multiple families/sizes), use multiple AZs, configure a base On-Demand percentage, implement interruption handling (2 min notification), and design fault-tolerant applications.
Question 24
Which CloudWatch alarm typically triggers a scale out?
A) CPU < 20%
B) CPU > 70% for 5 minutes
C) No alarm needed
D) Billing alarm
See the answer
Answer: B
A typical scale out alarm monitors CPUUtilization > 70% (configurable threshold) for several periods (e.g., 3 periods of 1 minute). When the alarm goes into ALARM, the scaling action adds instances.
Question 25
What is "Desired Capacity"?
A) The capacity desired by AWS
B) The number of instances the ASG tries to maintain
C) The server's maximum capacity
D) The desired number of users
See the answer
Answer: B
Desired Capacity is the number of instances the ASG actively maintains. If an instance fails, the ASG launches another to return to the desired. Scaling policies adjust the desired capacity within min/max limits.
Question 26
Can you manually modify the Desired Capacity?
A) No, only auto scaling can modify it
B) Yes, via console, CLI, or API
C) Only via API
D) Only if auto scaling is disabled
See the answer
Answer: B
You can manually modify the Desired Capacity at any time via the console, CLI (aws autoscaling set-desired-capacity), or API. The ASG will then adjust the number of instances. Scaling policies will adjust if necessary.
Question 27
How to monitor scaling activities?
A) CloudWatch only
B) CloudWatch, ASG Activity History, SNS notifications
C) Only EC2 logs
D) AWS Config only
See the answer
Answer: B
Monitor: Activity History in the ASG (action history), CloudWatch metrics (GroupDesiredCapacity, GroupInServiceInstances, etc.), CloudTrail for API calls, and configure SNS notifications for scaling events.
Question 28
What is "Suspend Processes" in an ASG?
A) Pause instances
B) Temporarily disable certain ASG processes (Launch, Terminate, etc.)
C) Suspend billing
D) Stop monitoring
See the answer
Answer: B
You can suspend ASG processes: Launch (no new instances), Terminate (no termination), HealthCheck (no verification), ReplaceUnhealthy, AZRebalance, etc. Useful for maintenance or debugging.
Question 29
Which metric indicates an ASG is scaling?
A) CPUUtilization
B) GroupDesiredCapacity, GroupInServiceInstances, GroupTotalInstances
C) NetworkIn
D) DiskReadOps
See the answer
Answer: B
ASG metrics include: GroupDesiredCapacity (target capacity), GroupInServiceInstances (healthy instances), GroupPendingInstances (launching), GroupTerminatingInstances (terminating). These metrics show scaling activity.
Question 30
How to test a scaling policy?
A) Wait for real load
B) Generate artificial load (stress test) or manually modify metrics
C) Read the documentation
D) It's not possible
See the answer
Answer: B
Test by generating artificial load (stress, ab, locust) to trigger alarms. Or use tools like stress on instances to increase CPU. Verify that the ASG scales as expected and that instances become healthy.
Result
Count your correct answers:
- 27-30: Excellent - You master Auto Scaling
- 22-26: Good - Some points to review
- 17-21: Average - Review the course before the lab
- Less than 17: Insufficient - Retake the course from the beginning
Proceed to the Auto Scaling Lab once you have achieved at least 22 correct answers.