Restore options
The following sections provide two database restore options for SQL Server on Amazon Elastic Compute Cloud (Amazon EC2), when your backups are on premises.
Using Amazon S3
This SQL Server database restore approach uses Amazon Simple Storage Service (Amazon S3) commands for the AWS Command Line Interface (AWS CLI) or the Amazon S3 API to upload the backup files directly to an S3 bucket.

The process consists of these steps:
-
Create an S3 bucket (or use an existing bucket) to store the backup files, and transfer backup (.bak) files from your on-premises database to the S3 bucket by using the AWS CLI or Amazon S3 API.
-
Deploy SQL Server on an EBS-optimized EC2 instance, using a SQL Server Amazon Machine Image (AMI). This AMI must contain EBS volumes that are configured with an OS partition, a DATA partition, a LOG partition, tempdb (NVMe) storage, and scratch space.
-
(Optional) Attach a non-root EBS volume to the EC2 instance.
-
Copy the backup files to the non-root EBS volume.
-
Restore the backup files from the EBS volume to SQL Server on the EC2 instance.
-
Use SQL Server management tools to manage your database.
Using AWS DataSync and Amazon FSx
This SQL Server database restore approach uses AWS DataSync to transfer the backup files to Amazon FSx for Windows File Server.

The process consists of these steps:
-
Deploy SQL Server on an EBS-optimized EC2 instance with attached NVMe, using an AMI that contains EBS volumes configured with OS, DATA, LOG, and tempdb. (For example, you can use the memory optimized
r5d.large
instance class.) -
Use FSx for Windows File Server to create a file server. This can be used as a temporary storage location to download SQL Server backup (.bak) files from your on-premises environment.
-
Create an DataSync endpoint and agent for the Amazon FSx file server.
-
DataSync automates data synchronization between your on-premises storage and the Amazon FSx file server without requiring Amazon S3.
-
Restore the backup files from the Amazon FSx file server to SQL Server on the EC2 instance.
-
Use SQL Server management tools to manage your database.
Note
Amazon EC2 offers Microsoft
SQL Server on Microsoft Windows Server AMIs
Using Amazon S3 File Gateway
You can use Amazon S3 File Gateway

The process consists of these steps:
-
Data is written on the file gateway’s local cache disk.
-
After the data is safely persisted to the local cache, the file gateway acknowledges the completion of the write operation to the client application.
-
The file gateway transfers data to the S3 bucket asynchronously. It optimizes data transfer and uses HTTPS to encrypt data in transit.
-
After data is uploaded to the S3 bucket, it stays in the file gateway’s local cache until it is evicted.