Blog
AdvancedReferenceAWS Data Platform

SQL Server on AWS - RDS, EC2, and reading the infrastructure

Comparing RDS and EC2 across compute, storage, networking, operations, availability and cost - plus the diagnostic skill of correlating engine wait types with CloudWatch metrics to tell a SQL problem from an infrastructure problem.

Applies to
SQL Server2016-2025 (13.x-17.x)Amazon RDScurrentAmazon EC2current
matureUpdated Reviewed
advancedAssumes production experience with the basics.

What you will be able to do

  • Compare RDS and EC2 on the eight axes that matter and pick by workload, not preference.
  • State the RDS storage rules that differ from intuition - gp3's flat limits, the io1/io2 ceilings, no striping bump.
  • Correlate a wait type to a CloudWatch metric and tell a SQL problem from a provisioned-capacity problem.
  • Describe Multi-AZ's durability win and its commit-latency cost.
  • Name what RDS removes - host access, some file-placement control, some trace access.

Concepts covered

On AWS the question is never just “how big a box” - it is managed or owned: RDS trades control for operations, EC2 trades convenience for control. The choice is workload- and team-shaped, and the honest comparison below is what decides it. Then the harder skill: reading a slow system and knowing whether the evidence points at the engine or at a provisioned ceiling AWS is enforcing.

The real-world analogy is transport: RDS is a leased, fully-serviced vehicle - maintenance, inspections and breakdown cover priced in, the bonnet sealed; EC2 is owning the car - any parts you like, but every service and repair is your problem and your time. The most common mistake is misattributing the ceiling: blaming SQL Server for a provisioned-IOPS limit AWS is enforcing, or blaming EC2 for a bad query plan - the engine and the platform are different systems billing differently, which is why the second half of this lesson reads every symptom on both sides before anything is scaled.

RDS versus EC2 - the eight-axis comparison

Axis RDS for SQL Server EC2 self-managed
Compute/memory Fixed instance classes; vertical only; no CPU pinning control Full instance catalogue; per-vCPU control; can match workload to shape
Storage gp3 or io1/io2 EBS - provisioned IOPS/throughput; no gp3 volume striping for SQL Server Any EBS layout; instance-store NVMe; striping, caching, file placement all yours
Networking Managed; Multi-AZ is a checkbox; no host network access Full VPC control; placement groups; SR-IOV/ENA tuning
Monitoring CloudWatch + Performance Insights + RDS events CloudWatch + whatever you install - full host and engine visibility
Admin/config No sysadmin-equivalent host access; parameter groups; some features gated Full sysadmin, host OS access, any trace or tool
Availability/DR Multi-AZ = synchronous standby, automatic failover You build it - AG, FCI, or log shipping on your own terms
Operational constraints Backups, patching, failover are managed; limited tempdb/file control Everything is yours - including everything that can break
Cost Convenience premium - compute + storage + licence Often cheaper per unit; the premium moves into headcount and labour

The storage rules that surprise people

Storage Size range IOPS Max throughput The catch
io2 Block Express 20 GiB to 64 TiB 1,000 to 256,000 4,000 MiB/s Sub-millisecond on Nitro instances; the latency-sensitive choice
io1 20 GiB to 16 TiB 1,000 to 64,000 1,000 MiB/s The 64k IOPS only on Nitro classes (m5, m6i, r5, r6i, z1d); 32k elsewhere
gp3 per engine baseline 3,000 IOPS / 125 MiB/s scales with what you provision RDS for SQL Server does not get gp3 volume striping, so no step-up on larger volumes

A 256,000-IOPS volume attached to an instance class that cannot drive it is money buying nothing: the instance has its own IOPS and throughput ceiling, and the lower of the two is the real one.

  • gp3 has flat configurable limits - you buy IOPS and throughput; on SQL Server RDS it does not get the automatic striping bump some other engines get on larger volumes.
  • io1 caps at 64k IOPS on a single SQL Server volume; io2 Block Express reaches 256k IOPS and 4,000 MiB/s - the choice is the provisioned ceiling, not a hardware property.
  • Multi-AZ adds commit latency - synchronous replication means the commit’s durability includes the standby’s acknowledgement; it is a durability buy with a latency cost.
  • The log wants a fast, dedicated path - write throughput is bounded by the log flush, and on a provisioned-IOPS volume the ceiling you purchased is the ceiling you get.

Reading the infrastructure - waits to CloudWatch

The diagnostic skill is the correlation: a SQL wait type and an AWS metric that, together, say whether the problem is in the engine or in the provisioned capacity.

SQL evidence CloudWatch counterpart The reading
PAGEIOLATCH waits, high ReadLatency/WriteLatency elevated, IOPS near provisioned Storage is the ceiling - provision more or reduce reads
PAGEIOLATCH high, IOPS low ReadLatency low, queue empty Not storage - a cold buffer or a scan reading too much; memory or index problem
WRITELOG high WriteLatency on the log volume elevated Log-device latency - the commit floor is a purchased number
SOS_SCHEDULER_YIELD high CPUUtilization at ceiling Genuine CPU saturation - scale up or reduce work
LCK_M_* high All infrastructure flat A SQL problem - blocking - that no amount of capacity fixes
Slow but waits flat NetworkIn/Out or app-side saturation The bottleneck left the database - look at the application

Performance Insights on RDS bridges the two - it renders engine waits against time so a wait spike and a CloudWatch metric spike can be laid on the same timeline.

The EC2 tempdb split

On EC2 you own the host, and the one layout that RDS cannot express is worth knowing: instance (ephemeral) storage is physically attached and far faster than EBS, but does not survive an instance stop. tempdb is rebuilt at every startup anyway, so the standard split is tempdb on instance storage and data and log on provisioned EBS. The price is that you are now responsible for everything RDS was doing.

The honest selection rule

RDS when the team values operations - managed backups, patching, Multi-AZ failover, and the convenience premium is worth the control it removes. EC2 when the workload needs what RDS gates: host access, file placement, aggressive tempdb or trace control, or a storage layout RDS cannot express. The profile decides - and the cost axis is labour-inclusive, because EC2’s cheaper compute is paid for in someone maintaining it.

Guided practice

A paper exercise - no AWS account needed. The scenario: a small team with no dedicated DBA runs a SQL Server workload that wants failover handled for it, and later reports that “queries are slow”. Work each step and check yourself before moving on.

  1. Make the platform call. RDS or EC2 for this team - and name the axes that decided it. Check: RDS - the availability and operational-constraints axes decide it: Multi-AZ is a checkbox and backups, patching and failover are managed. If you chose EC2 for cost, reread the cost axis - it is labour-inclusive, and a small team pays the difference in headcount.
  2. Choose the storage tier. The workload is latency-sensitive and the budget permits the top tier. Which storage, and what must be checked before it pays off? Check: io2 Block Express - sub-millisecond on Nitro instances, the latency-sensitive choice - but only after checking the instance class can drive it, because the lower of the volume’s ceiling and the instance’s ceiling is the real one. If you picked io2 without that check, revisit the “money buying nothing” paragraph.
  3. Read the first symptom. PAGEIOLATCH waits are high, ReadLatency is elevated and IOPS sits near the provisioned number. Engine problem or platform? Check: platform - storage is the ceiling; provision more or reduce reads. The wait and the metric agree, which is the whole correlation: if you blamed the engine, reread the waits-to-CloudWatch table.
  4. Read the second symptom. PAGEIOLATCH is high again, but ReadLatency is low and IOPS is far under the provisioned number. Same answer? Check: not storage - a cold buffer or a scan reading too much; a memory or index problem inside the engine. If you provisioned more IOPS anyway, you repeated the most common misdiagnosis named above.
  5. Decide on Multi-AZ. The workload needs automatic failover. What is bought and what is paid? Check: a synchronous standby with automatic failover, paid for in commit latency - the commit’s durability includes the standby’s acknowledgement. If you listed it as free, reread the Multi-AZ bullet - it is a durability buy with a latency cost.

Check your understanding

Ordered easy to hard. Answer each before reading the answer; a wrong answer names where to look.

  1. In one sentence each, what do RDS and EC2 trade? RDS trades control for operations - managed backups, patching, failover. EC2 trades convenience for control - host access, file placement, any tool you install. If you framed it as “managed versus unmanaged” without naming what each side loses, revisit the eight-axis table.
  2. Why can a high-IOPS volume be money buying nothing? The instance class has its own IOPS and throughput ceiling, and the lower of the two ceilings is the real one - provisioning past what the instance can drive buys capacity nothing can use. If you answered “the volume is fast, so it must help”, reread the storage rules - the catch is the pairing, not the volume.
  3. What does Multi-AZ buy, and what does it charge for it? A synchronous standby with automatic failover - durability and availability - charged as commit latency, because the commit is durable only once the standby has acknowledged it. If you said “high availability at no cost”, revisit the bullet that calls it a durability buy with a latency cost.
  4. SOS_SCHEDULER_YIELD is high and CPUUtilization is at ceiling; LCK_M_* is high and every infrastructure metric is flat. What is each, and why does the same fix fail one of them? The first is genuine CPU saturation - scale up or reduce work. The second is blocking inside the engine, and no amount of provisioned capacity fixes a lock queue. If you proposed scaling for both, revisit the table - capacity fixes ceilings, not contention.
  5. Argue the honest case for EC2 over RDS for a specific workload. EC2 is right when the workload needs what RDS gates: host OS access, file placement, the tempdb-on-instance-storage split, aggressive trace control, or a storage layout RDS cannot express - and when the team has the labour to operate everything RDS was doing. If your case rested on “EC2 is cheaper”, revisit the cost axis - the premium moves into headcount, so the saving is only real if the labour exists.

Section close - the stage project and the debrief

Project: a one-page RDS-versus-EC2 decision record. Take a described workload - an OLTP database with a reporting load, run by a small team - and write the decision record an architect would defend: the platform choice and the two axes that decided it; the storage tier with the volume-versus-instance ceiling check; the Multi-AZ call with its cost named; and a two-row waits-to-CloudWatch table for the symptoms this workload will actually show. Walkthrough: start from the eight-axis table and strike the axes that do not discriminate; let availability and operations decide before cost; verify the storage ceiling against the instance ceiling. Where people get stuck: cost is decided first when it belongs last - the labour-inclusive axis flips the answer - and the storage row is filled in without the instance-ceiling check, which is how a high-IOPS volume ends up on an instance class that cannot drive it.

Debrief. Having finished this section you can compare RDS and EC2 across the eight axes and justify the choice by workload and team, state the storage rules that differ from intuition, and correlate a wait type with a CloudWatch metric to separate an engine problem from a provisioned ceiling. The gaps that usually remain even when it feels understood: the correlation table has been read but not yet used against live metrics, and the platform call was made for a transactional workload shape - the concurrent analytical side has not entered yet. Next session: Snowflake Engineering, starting with Snowflake engineering - the warehouse platform - the compute-storage split that makes concurrent analytical load cheap.

Where SQL Server sits

How this component relates to the rest of the stack. Items without a link are not covered here yet.

Deployed with

Commonly run alongside

  • Windows Failover Clustering

Alternatives

Solves a similar problem differently