Which Amazon EC2 OS Use Hourly Billing Instead of Per-Second?

While Amazon EC2 uses per-second billing for open-source Linux distributions and Windows Server instances, commercial operating systems with third-party subscription fees or complex enterprise licensing continue to be billed on an hourly basis. Specifically, Red Hat Enterprise Linux, SUSE Linux Enterprise Server, Amazon EC2 Mac instances running macOS, and paid AWS Marketplace Amazon Machine Images with hourly software licenses are subject to hourly billing or strict hourly minimums rather than standard per-second billing.

Understanding Amazon EC2 Billing Granularity

Amazon Web Services introduced per-second billing in 2017 to prevent customers from paying for unused minutes when launching and terminating transient compute resources. With per-second billing, an instance is subject to a 60-second minimum charge each time it transitions into the running state, after which usage is calculated down to the exact second.

However, per-second billing only applies when the underlying operating system licensing agreement supports sub-hourly metering. When an Amazon Machine Image (AMI) incorporates a commercial operating system or third-party vendor license that is contractually structured around hourly blocks, AWS enforces hourly billing for those instances.

Commercial Operating Systems Billed by the Hour

Several prominent commercial operating systems and specialized platforms on Amazon EC2 do not use standard per-second billing.

1. Red Hat Enterprise Linux (RHEL)

On-Demand instances running Red Hat Enterprise Linux—including standard RHEL, RHEL for SAP, and RHEL with High Availability—are billed on an hourly basis. Whenever a RHEL instance is started, each partial instance-hour consumed is billed as a full hour.

For example, if you launch a RHEL instance, run it for 12 minutes, and stop it, you are billed for 1 full hour. If you start that same instance again 10 minutes later and run it for another 15 minutes before terminating it, you are billed for a second full hour.

2. SUSE Linux Enterprise Server (SLES)

Similar to RHEL, SUSE Linux Enterprise Server instances launched via AWS On-Demand licensing are billed in one-hour increments. Any partial hour of usage when an instance starts and stops is rounded up to the nearest full hour due to the structure of SUSE commercial subscription fees embedded in the instance price.

3. macOS on Amazon EC2 Mac Instances

Amazon EC2 Mac instances (mac1, mac2, mac2-m2, mac2-m2pro, and mac-m4 families) allow customers to run on-demand macOS workloads in the cloud. Because Apple's macOS Software License Agreement requires the operating system to run on dedicated Apple hardware for a minimum lease period, EC2 Mac instances must be launched as Dedicated Hosts.

While technically metered per second after the initial commitment period ends, EC2 Mac instances enforce a strict 24-hour minimum allocation period. Once allocated, you cannot release the Mac Dedicated Host for 24 full hours, making short-term sub-hourly billing impossible during the first day of operation.

4. Paid AWS Marketplace AMIs

When you launch a commercial operating system or software appliance from the AWS Marketplace—such as Cisco IOS XE, Fortinet FortiGate, Palo Alto Networks PAN-OS, or specialized Oracle Linux enterprise offerings—billing consists of two components:

  1. EC2 Infrastructure Cost: Billed per-second or per-hour depending on the base OS.
  2. Marketplace Software Fee: Billed according to the Independent Software Vendor (ISV) pricing model.

The vast majority of paid hourly AMIs in the AWS Marketplace charge their software licensing fee in full one-hour increments, with no partial-hour proration when an instance is stopped and restarted.

Commercial Operating Systems That Support Per-Second Billing

Not all commercial operating systems on EC2 require hourly billing. The following commercial environments do support per-second billing (with a 60-second minimum):

  • Microsoft Windows Server: Standard On-Demand Windows Server AMIs provided by AWS support per-second billing.
  • Windows Server with SQL Server: Official AWS AMIs bundling Windows Server with Microsoft SQL Server (Web, Standard, or Enterprise editions) are also billed per second.
  • Red Hat Cloud Access (BYOL): If you bring your own Red Hat subscription via the Red Hat Cloud Access program rather than paying for the license through AWS On-Demand pricing, you only pay AWS for the underlying bare compute infrastructure, which is billed per second.

Comparison of EC2 OS Billing Models

Operating System / Platform Billing Increment Minimum Charge per Launch Stop/Restart Behavior
Amazon Linux / Ubuntu / Debian Per-second 60 seconds New 60-second minimum
Microsoft Windows Server Per-second 60 seconds New 60-second minimum
Windows Server with SQL Server Per-second 60 seconds New 60-second minimum
Red Hat Enterprise Linux (On-Demand) Hourly 1 hour New 1-hour charge
SUSE Linux Enterprise Server (On-Demand) Hourly 1 hour New 1-hour charge
macOS (EC2 Mac Dedicated Hosts) Per-second after 24h 24 hours Host remains allocated for 24h
AWS Marketplace Commercial AMIs Hourly (Software Fee) 1 hour New 1-hour software charge

Cost Calculation Formula: Hourly vs. Per-Second

To illustrate the financial difference between hourly and per-second billing across multiple stop-and-start cycles, consider an instance with an hourly rate \(R\) that is started \(n\) times, running for \(t_i\) seconds during cycle \(i\) (where \(60 \le t_i < 3600\)).

Under per-second billing (such as Windows Server or Ubuntu), the total cost \(C_{\text{sec}}\) is proportional to the exact seconds used:

\[C_{\text{sec}} = \sum_{i=1}^{n} R \times \left(\frac{t_i}{3600}\right)\]

Under hourly billing (such as On-Demand RHEL or SLES), every partial hour is rounded up using the ceiling function, resulting in total cost \(C_{\text{hour}}\):

\[C_{\text{hour}} = \sum_{i=1}^{n} R \times \left\lceil \frac{t_i}{3600} \right\rceil = n \times R\]

Best Practices for Managing Hourly Billed EC2 Instances

When working with RHEL, SLES, or hourly AWS Marketplace instances, automated workflows that frequently stop and start instances can inadvertently multiply your cloud bill. To avoid paying for multiple full hours within a single clock hour:

  • Avoid Rapid Stop/Start Cycles: Do not use automated scripts that stop and restart RHEL or SLES instances multiple times within the same hour. Rebooting an instance from within the OS (sudo reboot) or via the RebootInstances API call does not trigger a new hourly billing cycle, whereas stopping and starting (StopInstances followed by StartInstances) initiates a brand-new billable hour.
  • Use BYOL Where Applicable: If your organization already owns enterprise licensing for Red Hat or SUSE, importing those licenses via BYOL transitions your EC2 billing purely to the underlying compute rate, unlocking per-second billing.
  • Consolidate Batch Tasks: For CI/CD runners or ephemeral build agents that require RHEL or SLES, keep a single instance running for the full 60-minute window to process multiple queued jobs rather than spinning up and terminating separate instances for each 5-minute build.