Lab 2: Using RDS with ASP.NET Applications

In this lab, I move my local Dino Store database to Amazon’s RDS.

First I had to go to RDS in AWS and create a new instance, this was a free tier instance so the settings are default, besides the username and password.


I also had to set a security group to allow inbound from only my IP address, now I have changed this to anywhere. Reason being is my IP address is not static and I am also moving to and from tech so my IP address will not stay to that IP. Sames me pulling out my hair when I’m trying figure out why my SQL database is not working.

I now need to go to MySQL workbench and connect to my new RDS using the endpoint address.


I then edit an excel file with the cloud links and import that into my new cloud database.


I then imported that and ran it. Now to check my tables have been populated


Now that my database is in the cloud I need to create a replica for backup, this is a simple task.

First I need to run the Create a read replica action in AWS


I created this in a different zone from my other database because well… If my database goes down because of that zone then so does my backup… Your site is only as smart as you make it!


Now I have my replica up I need to connect to in MySQL Workbench.


Let’s make sure our dinos are in this one.


Now let’s make some adjustments so our code takes into account our replica database.


Now I’ll make an adjustment to default.aspx.cs so that the images are pulled from the replica databse,┬átakes the load off the main database a bit, TEAMWORK!


Now let’s check it’s still all working.


So now I need to make an account, log in and check that the accounts are being made in the database.


Let’s check that database.


It’s all there, this is also on my replica server just to show it’s on both

Now the moment of truth of shutting down the master server and seeing if the website is still active. I can’t really show this is a picture but it worked very well. I am being asked why this still works.

Well, the point of having a replica is that it takes the position of that master if it goes down. It has all the same information as the master database. The point is that you should not even notice if one went down.




Post Author: Techdox

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.