Bird
Raised Fist0
AWScloud~20 mins

Minimum, maximum, and desired capacity in AWS - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Auto Scaling Capacity Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Auto Scaling Group Capacity Settings

An Auto Scaling Group (ASG) in AWS has the following settings:

  • Minimum capacity: 2
  • Maximum capacity: 5
  • Desired capacity: 4

What happens if the desired capacity is set to 6?

AThe ASG will launch 6 instances, exceeding the maximum capacity.
BThe ASG will launch 5 instances, respecting the maximum capacity limit.
CThe ASG will launch 4 instances, ignoring the desired capacity change.
DThe ASG will shut down instances to maintain the minimum capacity.
Attempts:
2 left
💡 Hint

Remember that the maximum capacity limits the number of instances the ASG can have.

❓ service_behavior
intermediate
2:00remaining
Behavior When Desired Capacity is Lower Than Minimum Capacity

An Auto Scaling Group has minimum capacity 3, maximum capacity 6, and desired capacity 4.

What happens if you set the desired capacity to 2?

AThe ASG will launch 3 instances, respecting the minimum capacity.
BThe ASG will launch 2 instances, below the minimum capacity.
CThe ASG will launch 4 instances, ignoring the desired capacity change.
DThe ASG will shut down all instances.
Attempts:
2 left
💡 Hint

The minimum capacity is the lowest number of instances the ASG maintains.

❓ Architecture
advanced
2:30remaining
Designing an Auto Scaling Group for Variable Traffic

You want to design an Auto Scaling Group that can handle traffic spikes up to 10 instances but normally runs with 3 instances. The minimum capacity should ensure availability, and the maximum capacity should prevent excessive costs.

Which configuration best fits this requirement?

AMinimum capacity: 3, Desired capacity: 3, Maximum capacity: 10
BMinimum capacity: 10, Desired capacity: 3, Maximum capacity: 10
CMinimum capacity: 3, Desired capacity: 10, Maximum capacity: 10
DMinimum capacity: 1, Desired capacity: 3, Maximum capacity: 10
Attempts:
2 left
💡 Hint

Minimum capacity should ensure availability during low traffic.

❓ security
advanced
2:30remaining
Security Implications of Auto Scaling Group Capacity Settings

An Auto Scaling Group is configured with minimum capacity 0, desired capacity 0, and maximum capacity 5. What is a potential security risk of this configuration?

AThe ASG will always run 5 instances, increasing attack surface.
BNo instances will run, so the application is unavailable and secure.
CInstances may launch unexpectedly if scaling policies trigger, possibly exposing unpatched instances.
DThe ASG will shut down instances randomly, causing security alerts.
Attempts:
2 left
💡 Hint

Think about what happens when scaling policies trigger from zero instances.

✅ Best Practice
expert
3:00remaining
Optimizing Auto Scaling Group Capacity for Cost and Performance

You manage an Auto Scaling Group with minimum capacity 2, maximum capacity 8, and desired capacity 5. You want to optimize for cost without sacrificing performance during peak hours.

Which strategy is best?

ASet desired capacity to 8 permanently to handle all peaks without scaling.
BSet maximum capacity to 2 to reduce costs and rely on instance performance.
CDisable scaling policies to keep capacity fixed at desired value.
DSet minimum capacity to 5 during peak hours and 2 during off-peak hours using scheduled scaling.
Attempts:
2 left
💡 Hint

Think about adjusting capacity based on predictable traffic patterns.

Practice

(1/5)
1. What does the MinSize setting control in an AWS Auto Scaling group?
easy
A. The exact number of servers to run at all times
B. The largest number of servers allowed to run
C. The smallest number of servers that must always be running
D. The number of servers to add during scaling

Solution

  1. Step 1: Understand MinSize meaning

    MinSize defines the minimum number of servers that the Auto Scaling group keeps running to handle load.
  2. Step 2: Compare with other settings

    MaxSize is the maximum allowed, DesiredCapacity is the target number, so MinSize is the smallest number always running.
  3. Final Answer:

    The smallest number of servers that must always be running -> Option C
  4. Quick Check:

    MinSize = smallest server count [OK]
Hint: MinSize = minimum servers always running [OK]
Common Mistakes:
  • Confusing MinSize with DesiredCapacity
  • Thinking MinSize is maximum limit
  • Assuming MinSize is the exact number to run
2. Which of the following is the correct way to set the desired capacity to 5 in an AWS Auto Scaling group configuration snippet?
easy
A. DesiredCapacity => 5
B. "DesiredCapacity" = 5
C. DesiredCapacity: "5"
D. "DesiredCapacity": 5

Solution

  1. Step 1: Identify correct JSON syntax

    In JSON, keys and string values use double quotes and key-value pairs use colon (:).
  2. Step 2: Check each option

    "DesiredCapacity": 5 uses correct JSON syntax: key in quotes, colon, numeric value without quotes.
  3. Final Answer:

    "DesiredCapacity": 5 -> Option D
  4. Quick Check:

    JSON key-value uses colon and quotes [OK]
Hint: JSON uses colon and quotes for keys [OK]
Common Mistakes:
  • Using equals sign instead of colon
  • Putting numbers in quotes unnecessarily
  • Using arrow symbols instead of colon
3. Given an Auto Scaling group with MinSize=2, MaxSize=6, and DesiredCapacity=4, what happens if the current number of running servers is 5 and one server fails?
medium
A. The group does nothing because the current number of running servers equals DesiredCapacity
B. The group launches a new server to maintain DesiredCapacity of 4
C. The group terminates another server to reach DesiredCapacity
D. The group launches two new servers to reach MaxSize

Solution

  1. Step 1: Understand DesiredCapacity role

    DesiredCapacity is the target number of servers to keep running, here 4.
  2. Step 2: Analyze failure impact

    One server fails, so running servers drop from 5 to 4, which matches DesiredCapacity.
  3. Step 3: Check if scaling needed

    Since running servers dropped below DesiredCapacity, the group launches a new server to maintain DesiredCapacity.
  4. Final Answer:

    The group launches a new server to maintain DesiredCapacity of 4 -> Option B
  5. Quick Check:

    Running servers < DesiredCapacity triggers scaling [OK]
Hint: Scaling triggers only if running servers < DesiredCapacity [OK]
Common Mistakes:
  • Assuming scaling happens immediately on failure
  • Confusing MinSize with DesiredCapacity
  • Thinking MaxSize limits minimum servers
4. You configured an Auto Scaling group with MinSize=3, MaxSize=5, and DesiredCapacity=6. What is the problem?
medium
A. DesiredCapacity cannot be greater than MaxSize
B. MinSize cannot be less than DesiredCapacity
C. MaxSize cannot be less than MinSize
D. No problem, this configuration is valid

Solution

  1. Step 1: Check relationship between capacities

    DesiredCapacity must be between MinSize and MaxSize inclusive.
  2. Step 2: Compare values

    DesiredCapacity is 6, but MaxSize is 5, which is less than DesiredCapacity.
  3. Step 3: Identify error

    This violates the rule that DesiredCapacity cannot exceed MaxSize.
  4. Final Answer:

    DesiredCapacity cannot be greater than MaxSize -> Option A
  5. Quick Check:

    DesiredCapacity ≤ MaxSize [OK]
Hint: DesiredCapacity must be ≤ MaxSize [OK]
Common Mistakes:
  • Setting DesiredCapacity higher than MaxSize
  • Confusing MinSize and MaxSize roles
  • Assuming any values are allowed
5. You want an Auto Scaling group to always run at least 2 servers, never more than 8, and normally keep 5 running. If traffic suddenly spikes, which setting controls the maximum servers it can scale up to, and what should it be set to?
hard
A. MaxSize controls maximum servers; set to 8
B. DesiredCapacity controls maximum servers; set to 8
C. MinSize controls maximum servers; set to 5
D. DesiredCapacity controls maximum servers; set to 2

Solution

  1. Step 1: Identify which setting limits maximum servers

    MaxSize sets the upper limit of servers allowed in the group.
  2. Step 2: Match requirement to setting

    To never exceed 8 servers, MaxSize must be set to 8.
  3. Step 3: Understand DesiredCapacity and MinSize roles

    DesiredCapacity is the target number (5), MinSize is the minimum (2), neither limits maximum scaling.
  4. Final Answer:

    MaxSize controls maximum servers; set to 8 -> Option A
  5. Quick Check:

    MaxSize = max servers allowed [OK]
Hint: MaxSize limits max servers; DesiredCapacity is target [OK]
Common Mistakes:
  • Confusing DesiredCapacity with MaxSize
  • Setting MinSize as maximum limit
  • Not setting MaxSize high enough for spikes
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard