Estimate AWS RDS Cost for SQL Server
Amazon Web Services (AWS) is one of the leading cloud providers in the industry, along with other cloud providers like Microsoft Azure and Google Cloud Platform. AWS RDS (Relational Database Service) offers features to host a database instance using six different types of database engines, one of them being Microsoft SQL Server.
While hosting database instances in the cloud, cost is one of the primary drivers. Generally, most of the cloud services have a pay-per-use type of billing model where the cost is pro-rated to the duration of use. The factors that influence the cost of using SQL Server database instance on AWS RDS service is the key to estimating the usage cost. Cloud projects typically involve many different cloud-based services, and cost estimating is generally considered a very critical exercise while determining the choice of technology stack for the solution. In this tip we will learn how to estimate the cost of hosting a SQL Server database instance using the AWS RDS service.
AWS RDS provides cost estimates while creating the database instance as well as AWS provides a tool called simple monthly calculator which can be used for cost estimation.
To understand the factors that influence the cost of hosting a database instance on the AWS RDS service, we need to use the AWS RDS Console and follow the steps to create a database instance to the point that it shows us estimates. So, let’s look at the steps to create a database instance using SQL Server as the database engine. To try out the steps explained below, it is assumed that you have an AWS account with access to RDS service.
Log on to AWS account from your web browser and navigate to the AWS RDS console by clicking on the RDS service menu item from the home page. Once you are on the AWS RDS Dashboard, the page would look as shown below.
Click on the Create Database button to start the steps for database creation process. Once you click on the button, the first step would look as shown below with the engine options. Select SQL Server as the database engine, and navigate to the next set of configuration options.
SQL Server Express Edition Costs on AWS
After selecting the database engine, the next configuration item is the SQL Server edition. RDS support four different types of editions as shown below. As a first step of the analysis, lets start with the Express edition which is the default selection.
Navigate to the next configuration option of database instance size. There are other configuration options before this one, but we will keep them as defaults for now as they do not influence the cost. DB instance size refers to the compute capacity available with the instance which directly influences cost as well as performance. We will test the effect of this setting on cost in a few steps. As we have selected the express edition which is the tiniest edition of SQL Server, the instance size setting would also offer limited instance sizes, the default one being t2.micro instance size which means 1 vCPU and 1 GiB RAM.
One another important configuration option before we start looking at the cost is Storage and Availability related settings as shown below. Here the default storage type is SSD and 20 GiB of storage space would be allocated for the database instance.
Keeping the default settings intact, navigate to the bottom of the page where you should be able to see the cost estimates as shown below, depending upon the region you have selected. In my case, I have selected Northern Virginia as the region. As you can see the monthly cost is very negligible for hosting this database instance. The reason being that the edition of SQL Server is Express edition which is generally for non-production use and has massive feature limitations and tiny instance size.
SQL Server Web Edition Costs on AWS
Let’s navigate back to the SQL Server edition setting and change the edition of SQL Server from Express to Web edition. This edition is used for web application or services.
If you navigate to the cost section, you would be able to see that the cost increased significantly, which proves that the edition of SQL Server has significant influence on the costs, which is obvious.
SQL Server Standard Edition Costs on AWS
To understand the magnitude of difference between different SQL Server editions, we need to look at the cost estimates for different editions. Navigate back to the edition setting, and this time change it to Standard edition.
Navigate back to the cost estimates setting and this time you would find that the cost increased almost 4.5 times, and other factors like Multi-AZ (Availability Zone) and Provisioned IOPS have come into picture which bears significant costs. Multi-AZ is like a stand-by instance of SQL Server apart from primary instance for HA. This can be thought of as Always On implementation. So, the cost of this instance is equal to the cost of primary instance. Provisioned IO per second (IOPS) guarantees a fixed number of transaction processing capacity, which requires some dedicated computing power, which influences cost.
SQL Server Enterprise Edition Costs on AWS
Finally, navigate back to the database edition setting and change the edition to Enterprise Edition, which is generally used for production purposes in large scale solutions.
Navigate back to the estimates, and you would see the estimate value as shown below. If you analyze these costs with the previous one, you would find that the cost has increased 1.5 times for the exact same settings.
Adjusting Settings to Determine AWS Costs
We have established here the database edition has significant impact on cost. The next factor to check out is the IOPS and database instance size. Try to change the IOPS from 1000 to 10000 as shown below.
If you navigate back to the estimates, you would be able to see that the cost estimates increased due to the increase in the charges that you would incur for additional IOPS to guarantee a higher IO performance which is generally required for write-heavy transactional applications.
Now let’s change the database instance size and double it up to m5.2xlarge as shown below.
Navigate back to the cost estimates and you would see that the cost increased significantly compare to the cost of provisioned iops. This shows that the database instance size is a huge factor after the database edition, that influences cost.
Consider that we are new to AWS RDS, and just looking to create a development instance which will be on typically during the weekdays 24x7 and would be stopped during the weekend. For this kind of requirements, we can scale down the database instance size and provisioned iops, as well as switch of Multi-AZ setting as we won’t be too concerned about HA of a development instance.
Navigate back to the SQL Server edition and select the Web edition license, if this database instance is the back-end for some web apps or web services.
If you check the estimates, you would be able to find that the estimates have come down significantly compared to an enterprise version of SQL Server having a large instance size, provisioned iops and Multi-AZ. One thing to note here is that this is the monthly estimate for a database instance that is on 24x7 instead of our intended usage of five days a week typically.
AWS Simple Monthly Calculator
Navigate to the AWS simple monthly calculator link from the hyperlink shown above. It would open a new tab with the simple monthly calculator. Navigate to Amazon RDS tab and fill up the same details that we had selected for the Web edition of SQL Server. Ensure that you mention your estimated hours of usage per week or per month. And you would be able to see that the cost decreased again. This is the proof of the pro-rated billing model where the cost of an instance is less when the usage is decreased.
One minor thing to note is that the incoming traffic in the database when you load data is free. But when you access the data from the SQL Server database instance, that network traffic would cost. If you scroll down the calculator page, you would find a section to fill up data transfer volumes. Let’s say that we have 10 GB of data ingested per month and assume that this data is consumed 5 times by the end-users i.e. 50 GB per month.
If you analyze the cost now, you would be able to see that the cost change but only fractionally. That means that the volume of data transfer in and out of the SQL Server database instance does not have a major impact on the cost.
In this way you can use the AWS RDS console for quick preliminary analysis and simple monthly calculator for detailed analysis of hosting a SQL Server database instance. Database edition, database instance, and provisioned IOPS are the major contributor of cost for hosting a SQL Server Database instance on the AWS RDS service.
- We covered the major factors contributing to cost, but there are more factors that influence cost like Reserved Instances. Consider exploring the simple monthly calculator in detail to understand all the factors that influence cost.
- Check out these other SQL Server AWS tips.
Last Updated: 2019-07-10
About the author
View all my tips