Restore Snapshot on AWS RDS MSSQL

Today I discovered some information and configuration changes we made on a development server need to be rolled back. But we’re not sure what or how they need to be rolled back. Fortunately, we have a snapshot of the RDS INSTANCE from early this morning. Here are the steps I am taking to retrieve the snapshot so I can investigate further.

NOTES BEFORE I START.

I have the AWS CLI set up and configured on my local workspace. I have admin privileges so access shouldn’t be an issue. I will be using PowerShell with the AWS CLI plug in. The SNAPSHOT will be restored side-by-side the original DEV INSTANCE, keeping in mind that it is not possible to restore a snapshot over an existing database.

THE SNAPSHOT

First, I need to know the exact name of the SNAPSHOT I wish to restore, so I will use this command to get a list and then copy the name of latest available.

aws rds describe-db-snapshots

Now I am ready to make the SNAPSHOT RESTORE happen. I will be using the AWS CLI RDS code RESTORE-DB-INSANCE-FROM-DB-SNAPSHOT. Here is a sample of my code for my situation.

aws rds restore-db-instance-from-db-snapshot 
--db-instance-identifier myrds01b 
--db-snapshot-identifier "rds:myrds01-2025-04-01-01-01" 
--db-instance-class db.r6i.xlarge 
--no-multi-az 
--no-auto-minor-version-upgrade 
--availability-zone us-east-1a 
--no-publicly-accessible 
--option-group-name "my-database-rds2022-optiongroup" 
--vpc-security-group-ids "sg-00000000" "sg-00000001" 
--domain d-0000000000 
--db-parameter-group-name "my-database-rds2022-paramgroup" 
--db-subnet-group-name "my-msad-dbrdssubnetgroup-abc123" 
--domain-iam-role-name "delegatedadmin/my-database-rds-role"

–db-instance-identifier: My original database is named myrds01 so this new instance is going to be called myrds01b. Notice the “b” appended to the end of the instance name. If I needed to actually replace myrds01, I could do that after the fact, by renaming each INSTANCE-IDENTIFIER.

–no-auto-minor-version-upgrade should be used initially on the RESTORE, I can change that later if I need to.

While some of these PARAMETERS are OPTIONAL, I like to spell out these ones to make sure they match my original database the best as possible. For example, I configured a custom option group and custom parameter group on the original database, so I don’t want the restored snapshot to use the default since it may behave differently. After-all I want it to be as close to the original as possible for this restore.

When I am unsure about what the DEFAULT choice will be, I can consult this documentation from AWS:

https://docs.aws.amazon.com/cli/latest/reference/rds/restore-db-instance-from-db-snapshot.html

Once I execute the code I can view my progress in the AWS CONSOLE. The size of my instance was about 1.5-TB and took roughly thirty minutes to restore. There are many factors that may affect the timing.

After the CREATING phase ended, the status went into BACKUP mode. I was able to connect to the database via SSMS while it was still backing up.

Pretty simple operation if I spend the time to research and get my parameters correct before starting.