SQL Server on Amazon EC2 single-node architecture
The following diagram illustrates a recommended architecture for a single-node SQL Server on Amazon Elastic Compute Cloud (Amazon EC2) before adding support for high availability (HA) and disaster recovery (DR).
In this architecture, the SQL Server database is deployed to an EC2 instance, using an Amazon Machine Image (AMI) for SQL Server and separate volumes for OS, DATA, LOG, and backups. Non-volatile memory express (NVMe) storage is attached directly to the EC2 instance and used for the SQL Server tempdb database. AWS Directory Service is used to set up Windows authentication for the SQL Server database. You can also use AWS Systems Manager to detect and install SQL Server patches and updates.

The following table summarizes the recommendations for configuring this architecture. These recommendations are discussed in detail in the sections that follow.
Instance type/AMI |
|
SQL Server edition |
|
Storage type |
|
Volumes |
|
DR options |
|
Instance types
AWS offers a selection of instance
classes
For critical workloads, the high-performance z1d instance
Amazon also provides dedicated AMIs
for SQL Server on Microsoft Windows Server
Storage
Some instance types offer NVMe instance store volumes. NVMe is a temporary (epheremal) storage option. This storage is directly attached to the EC2 instance. Although NVMe storage is temporary and data is lost on reboot, it offers the most optimal performance. Therefore, it is suitable for the SQL Server tempdb database, which has high I/O and random data access patterns. There is no additional charge for using an NVMe instance store for tempdb. For additional guidance, see the section Place tempdb in an instance store in the guide Best practices for deploying SQL Server on Amazon EC2.
Amazon EBS is a durable storage solution that meets SQL Server’s requirements for fast, available storage. Microsoft recommends keeping the data and log volumes separate for optimal performance. The reasons for this separation include the following:
-
Different data access methods. Data volumes use online transaction processing (OLTP) random data access, whereas log volumes use serial access.
-
Better recovery options. The loss of one volume doesn’t affect the other volume, and helps in the recovery of data.
-
Different workload types. Data volumes are for OLTP workloads, whereas log volumes target online analytic processing (OLAP) workloads.
-
Different performance requirements. Data and log volumes have different IOPS and latency requirements, minimum throughput rates, and similar performance benchmarks.
To select the right Amazon EBS volume type, you should analyze your database access methods, IOPS, and throughput. Collect metrics both during standard working hours and during peak usage. SQL Server uses extents to store data. The atomic unit of storage in SQL Server is a page, which is 8 KB in size. Eight physically contiguous pages make up an extent, which is 64 KB in size. Therefore, on a SQL Server machine, the NTFS allocation unit size for hosting SQL database files (including tempdb) should be 64 KB. For information about how to check the NTFS allocation size of your drives, see the guide Best practices for deploying SQL Server on Amazon EC2.
The choice of EBS volume depends on the workload—that is, whether the database is read-intensive or write-intensive, requires high IOPS, archive storage, and similar considerations. The following table shows a sample configuration.
Amazon EBS resource | Type | Description |
---|---|---|
OS disk |
|
General-purpose storage. |
DATA disk |
|
Write-intensive storage. |
LOG disk |
|
General-purpose storage for intensive workloads. |
Backup disk |
|
Less expensive archive storage. For better performance, backups can also be stored on a faster disk if they’re copied to Amazon Simple Storage Service (Amazon S3) regularly. |
Amazon EBS and Amazon S3 considerations
The following table shows a comparison of Amazon EBS and Amazon S3 for storage. Use this information to understand the differences between the two services and to choose the best approach for your use case.
Service | Availability | Durability | Notes |
---|---|---|---|
Amazon EBS |
|
|
|
Amazon S3 |
|
|
|
SQL Server on Amazon FSx for Windows File Server
Amazon FSx for Windows File Server provides fast performance with baseline throughput up to 2 GB/second per file system, hundreds of thousands of IOPS, and consistent sub-millisecond latencies. To provide the right performance for your SQL Server instances, you can choose a throughput level that is independent of your file system size. Higher levels of throughput capacity also come with higher levels of IOPS that the file server can serve to the SQL Server instances accessing it. The storage capacity determines not only how much data you can store, but also how many I/O operations per second (IOPS) you can perform on the storage—each GB of storage provides 3 IOPS. You can provision each file system to be up to 64 TiB in size (compared with 16 TiB for Amazon EBS). You can also use Amazon FSx systems as a file share witness for Windows Server Failover Cluster (WSFC) deployments.