03 / 04

What are EC2 capacity reservations?

Difficulty: 5/10
capacity reservations, instance planning, cost management

Understanding EC2 Capacity Reservations

An EC2 Capacity Reservation allows you to reserve compute capacity for your EC2 instances in a specific Availability Zone for any duration. This guarantees that AWS will have the capacity available when you need to launch your instances, regardless of overall region demand.

Key Characteristics
  1. 1

    Guarantee: Ensures capacity availability in a specific AZ for a specific instance type.

  2. 2

    Usage: Capacity is reserved regardless of whether you have instances running.

  3. 3

    Billing: You are charged for the reserved capacity whether you use it or not.

  4. 4

    Flexibility: Can be used in conjunction with Savings Plans and Reserved Instances to optimize costs.

Scenario Questions

0-2 years experience

  1. 1We need to run a batch job that requires 10 m5.large instances at 9 PM tonight. How would you ensure those instances are available without risking spot interruptions?
  2. 2A developer asks you to spin up a temporary EC2 instance for testing, but the account has a capacity reservation for t3.medium in that AZ. What happens and how do you handle it?
  3. 3Your Terraform script creates an EC2 instance but fails with an 'InsufficientInstanceCapacity' error. What steps do you take to resolve it using capacity reservations?

2-5 years experience

  1. 1Your team is migrating a microservice to a dedicated fleet of c5.xlarge instances. Explain how you would use capacity reservations to guarantee capacity while keeping costs reasonable, and what trade‑offs you consider.
  2. 2During a load‑test you notice some instances are not launching despite a capacity reservation being in place. Walk me through how you would debug the issue.
  3. 3You have a mixed‑region deployment and need to guarantee capacity in two AZs. How would you decide between a regional reservation versus separate AZ reservations?

5-8 years experience

  1. 1Design a strategy for a SaaS product that must guarantee capacity for on‑demand scaling across multiple regions during peak traffic, using EC2 capacity reservations. Discuss integration with Auto Scaling groups and cost controls.
  2. 2Your architecture uses Spot Instances for cost savings, but compliance requires a minimum number of on‑demand instances at all times. How would you combine capacity reservations with Spot Fleet to meet this requirement?
  3. 3Explain the edge cases when a capacity reservation expires while an Auto Scaling group still expects capacity. How would you mitigate impact?

8+ years experience

  1. 1The company plans to move from on‑premises servers to a hybrid cloud model, reserving capacity for critical workloads over several years. How would you evaluate the long‑term financial and operational trade‑offs of using EC2 capacity reservations versus Savings Plans or Reserved Instances, considering cross‑team budgeting and forecasting?
  2. 2You need to establish a governance framework for capacity reservations across dozens of product teams, each with different SLAs. Describe the processes, tooling, and policies you would put in place to ensure consistent usage, avoid overallocation, and enable auditability.
  3. 3A legacy application cannot be containerized and must run on specific instance types. Over a multi‑year horizon, how would you design a migration path that gradually reduces reliance on capacity reservations while maintaining service continuity?

Follow-up Questions

  • What metrics would you monitor to ensure your reservation is being fully utilized?
  • How would you respond if a sudden traffic spike exceeds your reserved capacity?
  • Can you compare the flexibility and billing implications of capacity reservations versus Reserved Instances?
Share

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.