Home / Databases / SQL Server

DatabasesHow-toAdvanced

Transform an on-premises SQL Server failover cluster to AWS: FCI on EC2 with Amazon FSx

Rebuild a shared-storage SQL Server Failover Cluster Instance on EC2 using Amazon FSx for Windows File Server (SMB) or FSx for NetApp ONTAP (iSCSI) across two Availability Zones. Covers when FCI beats an AG, cluster networking on AWS, storage choice, and migration steps.

Deepak Bhardwaj2 min read

Applies toSQL Server 2016+ (Standard 2-node FCI or Enterprise) on Windows Server 2019/2022 EC2, FSx for Windows File Server Multi-AZ, FSx for NetApp ONTAP Multi-AZ

Why keep an FCI

  • The whole instance fails over: logins, jobs, linked servers, SSIS catalog — no syncing objects between replicas.
  • Standard edition supports a 2-node FCI (AG in Standard is limited to Basic AGs).
  • Teams already operate FCIs on-premises; the same skills apply.

On AWS, shared storage comes from FSx, which is itself highly available across AZs.

1. Storage options

Option Protocol Notes
FSx for Windows File Server (Multi-AZ) SMB 3 continuously available shares Simple; SQL Server data and logs on an SMB share; throughput capacity sized for SQL
FSx for NetApp ONTAP (Multi-AZ) iSCSI LUNs (or SMB) Block storage like a SAN; snapshots, SnapMirror for DR, storage efficiency

2. Network and cluster design

  • Two EC2 nodes in two AZs (different subnets) — a multi-subnet cluster.
  • Each node gets secondary private IPs for the cluster IP and the SQL network name (one per subnet); the cluster uses these instead of a load balancer.
  • Domain-joined (AWS Managed Microsoft AD or self-managed AD).
  • Witness: file share witness on FSx, or a cloud witness (Azure storage) if allowed, or a third-AZ file share.
New-Cluster -Name sqlclu01 -Node sqlnode1, sqlnode2 -StaticAddress 10.10.1.50, 10.10.2.50 -NoStorage
Set-ClusterQuorum -FileShareWitness \\fsx-witness.corp.local\witness

3. Install SQL Server FCI

  • FSx for Windows: during setup, point data and log directories to the SMB share (\\amznfsxabc.corp.local\share\SQLData). The SQL service account needs full control on the share.
  • FSx for ONTAP: connect iSCSI LUNs to both nodes with MPIO, add them as cluster disks, then run SQL setup "New SQL Server failover cluster installation" on node 1 and "Add node" on node 2.

4. Migrate the data

  • Backup/restore (via S3), log shipping, or a distributed AG from the on-premises instance to the FCI for minimal downtime.
  • Copy instance objects with dbatools (Copy-DbaLogin, Copy-DbaAgentJob, ...).
  • Cut over by updating the DNS alias to the new SQL network name.

5. Test failover

Move-ClusterGroup -Name "SQL Server (MSSQLSERVER)" -Node sqlnode2

Test node failure (stop the instance), AZ failure simulation, and FSx failover (FSx Multi-AZ fails over automatically; SQL may see a short IO pause).

6. DR

  • FSx for ONTAP SnapMirror to a second region, or
  • Log shipping / distributed AG to a DR instance in another region, or
  • AWS Elastic Disaster Recovery for the nodes (check support for clustered setups).

Tip

Size FSx throughput capacity from your SQL IO baseline (MB/s and IOPS), not just storage size. An undersized FSx throughput tier is the most common cause of a slow FCI on AWS.