[AWS] EC2 Purchasing Options

AWS provides various purchasing options for users to optimize their costs based on their needs. On-demand is the base option. You can pay just for what you use. But you can get a discount by reserving instances for a set of periods.

Link: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html


On-Demand

  • Pay the fixed price by the hour or the second (depending on the type of an instance)
  • You can provision and terminate at any time.
  • You are charged a fixed rate when the instance is running.
  • No commitment and no up-front payment
  • Most flexible but most expensive

Reserved Instance (RI)

  • You can purchase an instance for a set time of periods (1 or 3 years) with huge discount
  • 3 ways of payments: pay upfront, partial upfront, no upfront
  • AZ-specific RIs provide capacity reservation.
  • Regional RIs have no capacity reservation, but they are more flexible.
  • Standard RIs: You cannot change instance types.
  • Convertible RIs: They have the option to change to a different reserved instance type of equal or greater value.

Scheduled Reserved Instances (Scheduled Instances)

  • You can purchase capacity reservations that recur on a daily, weekly, or monthly basis, with a specified start time and duration.
  • Scheduled Instances are a good choice for workloads that do not run continuously but run on a regular schedule. For example, you can use Scheduled Instances for an application that runs during business hours or for batch processing that runs at the end of the week.
  • You reserve the capacity in advance so that you know it is available when you need it. You pay for the time that the instances are scheduled, even if you do not use them.

Spot Instance

  • Spot instances are charged based on the AZ spot price (by the minute).
  • Instance can be terminated with 2 minutes notice.
  • Spot block: You may stop your spot instances from being terminated. (1 – 6 hours)
  • Spot instances can be used for
    • Applications that have flexible start and end times.
    • Applications with urgent need of large amount of additions compute resources

Dedicated Hosts

  • You pay for a physical server that us fully dedicated to running your instances.
    • You can provision EC2 instances on physical servers dedicated for you.
  • The type and size of the instance determine the number of instances in a dedicated host.
  • Dedicated hosts can be used when there are regulatory requirements that may not support multi-tenant virtualization, such as some government projects. Or certain software might require hardware specifications.
  • You are charged for the host instead of instances.

When to use

On-Demand

  • default
  • unpredictable workloads that cannot tolerate interruption
  • applications under development
  • workloads that will run for a short time – less than a year

Reserved Instances

  • Base workload
  • consistent and steady workload usage with more than a year of commitment
  • known growth and predictable usage
  • critical systems

Spot Instances

  • cost-critical with busty workload that can be interrupted

Spot fleets

  • Spot fleets consist of a container of spot instances and optional on-demand instances.
  • A spot fleet is used to launch the preconfigured instances to meet the target capacity needs with price restraints.

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s