How to set up SQL Server RDS

Published: April 10, 2021 (Updated: Apr 10, 2021)

Enjoying this content? Subscribe to the Channel!

The Ultimate Guide: Deploying MS SQL Server on AWS RDS (And Why You Should Ditch Your Own Database Server)

Welcome back to Darren’s Tech Tutorials! We’re diving into one of the most powerful and efficient ways to run a database in the cloud: Amazon Web Services (AWS) Relational Database Service, or RDS.

If you’ve ever spent hours patching OS servers, worrying about backups, or stressing over storage scaling for your MS SQL Server, this tutorial is for you. AWS RDS handles all that operational heavy lifting, allowing you to focus purely on your data and applications.

In this comprehensive guide, we’ll walk you through the essential steps to get MS SQL Server up and running on AWS RDS and, most importantly, how to successfully connect to it. Let’s dive in!


Why Choose AWS RDS for Your SQL Server Deployment?

The primary advantage of using RDS is that it is a managed service. What does that mean for you?

  • No OS Management: AWS handles the patching, maintenance, and underlying operating system of the database instance.
  • Automatic Backups: Built-in automated backups and point-in-time recovery are standard.
  • Scalability: Easily scale your storage and compute resources up or down with minimal downtime.
  • High Availability: Effortlessly configure Multi-AZ deployments for automatic failover and durability.

In short, you get the robust power of SQL Server without the administrative headache of managing the underlying infrastructure.

Step-by-Step: Setting Up Your SQL Server Instance on RDS

Setting up your database instance is done entirely within the AWS Management Console. Follow these key steps:

Step 1: Navigate to the RDS Console

Log into your AWS account and search for “RDS.” Click the Create database button to start the configuration wizard.

Step 2: Choose Your Engine and Deployment Method

  1. Select Engine Type: Choose Microsoft SQL Server.
  2. Select Edition: Pick the edition that meets your needs (e.g., Express, Web, Standard, or Enterprise).
  3. Deployment Option: For production environments, consider Multi-AZ DB instance for high availability, but for simple tutorials or testing, stick to a single instance.

Step 3: Define Instance Specifications

This is where you choose the compute power and size of your database:

  1. DB Instance Identifier: Give your database a unique, recognizable name (e.g., darren-sql-prod).
  2. Master Credentials: Set the username (often admin) and a strong password. Store these securely! You will need them to connect later.
  3. DB Instance Size: Choose an appropriate instance class (e.g., t3.micro for testing, or larger m or r instances for production workloads).

Step 4: Configure Network and Security

This is arguably the most crucial step for connectivity. You need to ensure your database is accessible to your application servers or client machines.

  1. VPC: Select the Virtual Private Cloud where your database should reside.
  2. Subnet Group: Choose the subnets within your VPC.
  3. Public Accessibility: If you need to access the database from outside the VPC (e.g., your local machine), set this to Yes. (Note: In production environments, it’s usually best practice to set this to No and connect via a VPN or bastion host.)
  4. VPC Security Group: You must define a security group that allows inbound traffic on the default SQL Server port (1433) from the IP addresses you plan to connect from. If you don’t do this, the connection will fail.

Step 5: Finalize and Launch

Review all your settings, pay attention to the estimated monthly costs, and click Create database.

AWS will now provision your SQL Server instance, which may take several minutes. Once the status changes to Available, you are ready to connect!

Accessing and Managing Your New RDS SQL Server

Now that your instance is running, the next step is connecting to it. To manage your data, you’ll need a client tool. The industry standard is Microsoft’s SQL Server Management Studio (SSMS).

1. Retrieve the Database Endpoint

In the RDS console, click on your newly created SQL Server instance. Look for the Endpoint address. This is the host address you will use to connect, replacing the standard hostname.

2. Prepare Your Client Machine

You need two things to connect: a client machine and SSMS installed.

  • Client Machine: This is the server or local desktop from which you initiate the connection. Ensure your firewall and the AWS Security Group allow traffic from this machine.
  • SSMS: This is the tool that lets you manage databases, run queries, and modify schemas.

3. Establish the Connection via SSMS

  1. Open SSMS on your client machine.
  2. In the connection dialogue box, enter the following:
    • Server name: Paste the Endpoint address you copied from the RDS console.
    • Authentication: Select SQL Server Authentication.
    • Login: Enter the Master Username (e.g., admin).
    • Password: Enter the Master Password you set during creation.
  3. Click Connect.

If your networking and security groups are configured correctly, you should now see your RDS SQL Server instance in the SSMS Object Explorer! You can now create databases, users, and tables just as you would on any on-premises SQL Server, but with all the benefits of the AWS managed infrastructure.


Conclusion: Start Building with Confidence!

Congratulations! You have successfully deployed a robust, highly available, and easily scalable MS SQL Server instance on AWS RDS. By leveraging this managed service, you’ve saved yourself countless hours of server maintenance and operational overhead, allowing you to get back to what matters most: developing fantastic applications.

Ready to put this knowledge into action? Try deploying a basic test instance today!

If you found this guide helpful, make sure to hit that Like button, Subscribe to Darren’s Tech Tutorials for more actionable cloud guides, and let us know in the comments below what cloud technology you want us to tackle next! Happy coding!