Home / Databases / SQL Server

DatabasesHow-toIntermediate

AWS-to-AWS modernisation: SQL Server on EC2 to Amazon RDS for SQL Server

Move self-managed SQL Server on EC2 to Amazon RDS to hand over patching, backups and Multi-AZ HA. Covers the readiness check against RDS limits, sizing from CloudWatch data, migration by native backup or DMS, replacing instance-level features, and decommissioning.

Deepak Bhardwaj2 min read

Applies toSQL Server 2016+ on Amazon EC2 to Amazon RDS for SQL Server (Standard / Enterprise / Web)

1. Why move

On EC2 you do On RDS
OS + SQL patching AWS-managed minor versions in maintenance windows
AG/FCI design and testing Multi-AZ with automatic failover (synchronous)
Backup jobs, retention, PITR Automated backups and PITR (up to 35 days), snapshots
Monitoring agents CloudWatch, Database Insights, Enhanced Monitoring
Storage resizing Storage autoscaling

2. Readiness: RDS limits to check

  • No sysadmin, no OS access; some server-level settings via parameter groups only.
  • Max databases per instance (depends on instance class/edition; check current quota).
  • Features delivered as options: SSIS, SSRS, SSAS, native backup/restore, TDE, MSDTC.
  • Linked servers: supported to other SQL Servers and some sources (check docs); OLEDB providers you install yourself aren't possible.
  • xp_cmdshell, CLR (depends on version), FILESTREAM: not supported → keep on EC2 or RDS Custom.

Scan instance features on the EC2 server with the assessment queries (linked servers, CLR assemblies, agent job steps using CmdExec/PowerShell).

3. Size from real data

Use 2–4 weeks of CloudWatch EC2 metrics and SQL counters (CPU p95, memory, EBS IOPS/throughput). RDS Multi-AZ doubles compute cost, but replaces your second AG node — compare like for like.

4. Migrate

Method Downtime
Native backup to S3 → rds_restore_database with NORECOVERY + logs → rds_finish_restore Final log + finish (minutes)
AWS DMS full load + CDC Minutes (good when consolidating many databases into fewer RDS instances)

Since both sides are in AWS, use S3 in the same region and a gateway VPC endpoint — fast and no internet traffic.

5. Replace instance-level pieces

  • Agent jobs with CmdExec/PowerShell steps → Lambda/EventBridge Scheduler or SSM Run Command.
  • Server-level triggers, custom error log handling → CloudWatch Logs + alarms.
  • Windows logins → join RDS to AWS Managed Microsoft AD.
  • Maintenance (index/statistics) → keep Ola Hallengren scripts as SQL Agent jobs on RDS (supported).

6. Cutover and decommission

  1. Cutover with the runbook; switch the DNS alias (Route 53 private hosted zone CNAME) to the RDS endpoint.
  2. Keep EC2 stopped (not terminated) for a rollback period; snapshot volumes.
  3. Terminate EC2, delete volumes and old snapshots; adjust Savings Plans / RIs.

Tip

Use a Route 53 CNAME like sales-db.internal.corp for the app connection. Moving from EC2 to RDS — and later to a bigger RDS or Aurora — becomes a DNS update.