AWS Instance Purchase Options

Table of contents

  1. Spot Instances:

    • Highly Cost-Effective: Up to 90% cheaper than On-Demand instances.

    • Key Risk: Instances can be terminated by AWS with short notice (2 minutes).

    • Use Case: Ideal for non-critical, fault-tolerant workloads like batch jobs or testing.

  2. Savings Plans:

    • Flexible Savings: Discounts apply across regions, instance types, and OS (Compute Savings Plan).

    • Commitment: Requires a consistent hourly spend commitment (1 or 3 years).

    • Use Case: Long-term workloads with predictable usage.

  3. Reserved Instances (RIs):

    • Maximum Savings: Up to 75% off On-Demand prices.

    • Lock-In: Tied to a specific region, instance type, and tenancy (unless Convertible RI).

    • Use Case: Critical, steady-state applications like databases or enterprise systems.

  4. Dedicated Hosts:

    • Compliance-Oriented: Required for workloads with strict licensing or regulatory needs.

    • Higher Cost: More expensive than shared tenancy but necessary for certain cases.

    • Use Case: Enterprise-grade applications or BYOL software.

  5. Capacity Reservations:

    • Guaranteed Availability: Ensures capacity in specific AZs, especially during high demand.

    • Cost Neutral: No discounts unless paired with RIs or Savings Plans.

    • Use Case: Business-critical or disaster recovery setups needing guaranteed capacity.

General Tips:

  • Optimize Usage: Use Spot Instances for temporary workloads, Savings Plans for flexibility, and RIs for predictable usage.

  • Combine Options: Pair Capacity Reservations with RIs or Savings Plans to reduce costs.

  • Monitor Usage: Regularly use AWS Cost Explorer and Trusted Advisor to ensure cost optimization.

  • Test First: For complex setups, consider starting with On-Demand instances to validate requirements before committing.

CPU Credits in AWS

  • CPU Credits allow burstable EC2 instances (e.g., t2, t3, t4g) to temporarily exceed their baseline CPU performance by using accumulated credits.

  • Baseline: Guaranteed CPU performance (e.g., 10% for t3.micro).

  • Bursting: Credits are used to exceed baseline during high-demand periods.

  • Unlimited Mode: Instances can burst even without credits, but extra charges apply for the surplus usage.

  • Standard Mode: Throttles to baseline when credits run out.

  • Use Case: Best for workloads with low to moderate, unpredictable CPU usage (e.g., dev environments, small web servers).

  • Monitoring: Track CPUCreditBalance and CPUCreditUsage via CloudWatch.