with Amazon RDS
In this tutorial, you will learn how to create a Microsoft SQL Server database Instance (we call this a 'DB instance'), connect to the database, and delete the DB instance. We will do this using Amazon Relational Database Service (Amazon RDS) and everything done in this tutorial is free tier eligible.
Manage Your AWS Resources
Sign in to the ConsoleWhen you click here, the AWS management console will open in a new browser window, so you can keep this step-by-step guide open. When this screen loads, find RDS under Database and click to open the Amazon RDS Console.
In this step, we will use Amazon RDS to create a Microsoft SQL Server DB Instance with db.t2.micro DB instance class, 20 GB of storage, and automated backups enabled with a retention period of one day. As a reminder, all of this is free tier eligible.
a. In the top right corner of the Amazon RDS console, select the Region in which you want to create the DB instance.
Note: Amazon cloud computing resources are housed in highly available data center facilities in different areas of the world. Each Region contains multiple distinct locations called 'Availability Zones,' or AZs. You have the ability to choose which Region to host your Amazon RDS activity in.
f. Your DB Instance is now being created. Click View Your DB Instance
Note: Depending on the DB instance class and storage allocated, it could take several minutes for the new DB instance to become available.
The new DB instance appears in the list of DB instances on the RDS console. The DB instance will have a status of creating until the DB instance is created and ready for use. When the state changes to available, you can connect to a database on the DB instance.
Feel free to move on to the next step as you wait for the DB instance to become available.
Once the database instance creation is complete and the status changes to available, you can connect to a database on the DB instance using any standard SQL client. In this step, we will download Microsoft SQL Server Management Studio Express, a popular client for SQL Server.
a. Go to the Microsoft Download Center - Microsoft SQL Server Management Studio Express page and click Continue.
Note: Remember to download the SQL client to the same device from which you created the RDS DB Instance. The security group your database is placed in is configured to allow connection only from the device from which you created the DB instance.
b. You will be prompted to register with Microsoft -- this step is not required for download. You can skip registration by selecting the radio button next to 'No, I do not want to register. Take me to the download' and click Next on the popup modal.
Then, select the SQL Management Studio you need and click Next to start your download.
In this step, you will connect to the database you created using SQL Server Management Studio.
a. Once you have completed your download, install and open the program. A dialogue box appears. Enter the following:
- Server type: Select Database Engine
- Hostname: You can find your hostname on the Amazon RDS console as shown in the screenshot to the right. Note that the port number is included at the end of the hostname - copy and paste only the hostname of the DB Instance running the Microsoft SQL Server database engine.
- Username: Type in the username you created for the Amazon RDS database. Our example is 'masterUsername.'
- Password: Enter the password you used while creating the Amazon RDS database.
Click Connect.
You can easily delete the Microsoft SQL Server DB Instance from the Amazon RDS console. In fact, it is a best practice to delete instances you are no longer using so you don’t keep getting charged for them.
You have created, connected to, and deleted a Microsoft SQL Server Database Instance with Amazon RDS. Amazon RDS makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity while managing time-consuming database administration tasks, freeing you up to focus on your applications and business.
Now that you have learned to create and connect to a Microsoft SQL Server Database through Amazon RDS, you can progress to the next tutorial where you will learn to restore a DB Instance from a DB Snapshot.