Amazon Relational Database Service
User Guide (API Version 2014-10-31)

Creating a Microsoft SQL Server DB Instance and Connecting to a DB Instance

The basic building block of Amazon RDS is the DB instance. Your Amazon RDS DB instance is similar to your on-premises Microsoft SQL Server. After you create your SQL Server DB instance, you can add one or more custom databases to it.


You must have an AWS account before you can create a DB instance. If you don't have an AWS account, open, and then choose Create an AWS Account.

In this topic you create a sample SQL Server DB instance. You then connect to the DB instance and run a simple query. Finally you delete the sample DB instance.

Creating a Sample SQL Server DB Instance

In this procedure you use the AWS Management Console to create a sample DB instance. Since you are only creating a sample DB instance, each setting is not fully explained. For a full explanation of each setting, see Creating a DB Instance Running the Microsoft SQL Server Database Engine.

To create a DB instance running the Microsoft SQL Server DB engine

  1. Sign in to the AWS Management Console and open the Amazon RDS console at

  2. In the top right corner of the Amazon RDS console, choose the region in which you want to create the DB instance.

  3. In the navigation pane, choose Instances.

  4. Choose Create database.

    The Select engine page appears.

						Engine selection
  5. Choose the SQL Server icon, and then choose Select for the SQL Server Express edition.

    The Specify DB Details page appears.

						DB instance details
  6. On the Specify DB Details page, provide the information for your DB instance as shown in the following table:

    For This Parameter Do This

    License Model

    Choose license-included to use the general license agreement for Microsoft SQL Server.

    DB Engine Version

    Choose the most recent version of SQL Server available in the list.

    DB Instance Class

    Choose db.t2.micro. This instance class is appropriate for testing.

    Time Zone

    Do not choose a time zone. If you don't choose a time zone, your DB instance uses the default time zone.

    Storage Type

    Choose the storage type General Purpose (SSD).

    Allocated Storage

    Type 20 to allocate 20 GiB of storage for your database. There is a warning that you should consider allocating more storage, but since this is a sample DB instance, 20 GiB is sufficient.

    DB Instance Identifier

    Type sample-instance.

    Master Username

    Type a name that you will use as the master user name to log on to your DB Instance with all database privileges. The master user name is a SQL Server Authentication login.

    Master Password and Confirm Password

    Type a password for your master user password. It must contain between 8 and 128 printable ASCII characters (excluding /,", and @).

  7. Choose Next to continue.

    The Configure Advanced Settings page appears.

    					Additional Configuration panel
  8. On the Configure Advanced Settings page, provide the information for your DB instance as shown in the following table:

    For This Parameter Do This


    Choose Create new VPC.

    Subnet Group

    Choose Create new DB Subnet Group.

    Publicly Accessible

    Choose Yes.

    Availability Zone

    Choose No Preference.

    VPC Security Group

    Choose Create new Security Group.

    Database Port

    Leave the default value of 1433 unless you have a specific port you want to access the database through. SQL Server installations default to port 1433, but in some cases a firewall might block this port. If in doubt, ask your network administrator what port you should use.

    DB Parameter Group

    Leave the default value.

    Option Group

    Leave the default value.

    Copy Tags To Snapshots

    Leave this setting unselected.

    Backup Retention Period

    Choose 7.

    Backup Window

    Choose No Preference.

    Enable Enhanced Monitoring

    Choose No.

    Auto Minor Version Upgrade

    Choose Yes.

    Maintenance Window

    Choose No Preference.

  9. Choose Create database.

  10. Choose View Your DB Instances.

    On the RDS console, the new DB instance appears in the list of DB instances. The DB instance has a status of creating until the DB instance is ready to use. When the state changes to available, you can connect to the DB instance. Depending on the DB instance class and the amount of storage, it can take up to 20 minutes before the new instance is available.

						My DB instances list

Connecting to Your Sample SQL Server DB Instance

In this procedure you connect to your sample DB instance by using Microsoft SQL Server Management Studio (SSMS). To download a stand-alone version of this utility, see Download SQL Server Management Studio (SSMS) in the Microsoft documentation.

To connect to a DB Instance using SSMS

  1. Find the DNS name and port number for your DB Instance.

    1. Open the RDS console and then choose Instances to display a list of your DB instances.

    2. Choose the row for your SQL Server DB instance to display the summary information for the instance.

    				            Locate DB Instance endpoint and port
    3. Copy the endpoint. The Endpoint field has two parts separated by a colon (:). The part before the colon is the DNS name for the instance, the part following the colon is the port number. Copy both parts.

  2. Start SQL Server Management Studio.

    The Connect to Server dialog box appears.

    					Connect to Server dialog
  3. Provide the information for your sample DB instance.

    1. For Server type, choose Database Engine.

    2. For Server name, type or paste the DNS name and port number of your sample DB Instance, separated by a comma.


      Change the colon between the DNS name and port number to a comma.

      For example, your server name should look like the following:,1433
    3. For Authentication, choose SQL Server Authentication.

    4. For Login, type the master user name you chose earlier for your sample DB instance.

    5. For Password, type the password you chose earlier for your sample DB instance.

  4. Choose Connect.

    After a few moments, SSMS connects to your DB instance. If you can't connect to your DB instance, see Troubleshooting the Connection to Your SQL Server DB Instance.

Exploring Your Sample SQL Server DB Instance

In this procedure you continue the previous procedure and explore your sample DB instance by using Microsoft SQL Server Management Studio (SSMS).

To explore a DB Instance using SSMS

  1. Your SQL Server DB instance comes with SQL Server's standard built-in system databases (master, model, msdb, and tempdb). To explore the system databases, do the following:

    1. In SSMS, on the View menu, choose Object Explorer.

    2. Expand your DB instance, expand Databases, and then expand System Databases as shown following.

								Object Explorer displaying the system databases
  2. Your SQL Server DB instance also comes with a database named rdsadmin. Amazon RDS uses this database to store the objects that it uses to manage your database. The rdsadmin database also includes stored procedures that you can run to perform advanced tasks.

  3. You can now start creating your own databases and running queries against your DB instance and databases as usual. To run a test query against your sample DB instance, do the following:

    1. In SSMS, on the File menu point to New and then choose Query with Current Connection.

    2. Type the following SQL query:

      select @@VERSION
    3. Run the query. SSMS returns the SQL Server version of your Amazon RDS DB instance.

			                    SQL Query Window

Deleting Your Sample DB Instance

Once you are done exploring the sample DB instance that you created, you should delete the DB instance so that you are no longer charged for it.

To delete a DB instance

  1. Sign in to the AWS Management Console and open the Amazon RDS console at

  2. In the Instances list, choose your sample DB instance.

  3. Choose Instance Actions, and then choose Delete.

  4. For Create final Snapshot, choose No.


    You should create a final snapshot for any production DB instance that you delete.

  5. Choose Delete.

Related Topics