This article covers the Amazon Relational Database Service (RDS), Amazon DynamoDB, and AWS Data Migration Service. For each tool, we will cover what it is, how it’s billed and the available free tier, and some example projects you can try.
In our previous article, we discussed the free tier for Amazon EC2 and AWS Lambda, two of the compute services offered by AWS. In this article, we will discuss the free tier for AWS’ database offerings.
Table of Contents
Amazon Relational Database Service (RDS)
Amazon RDS is a fully-managed relational database service. Rather than configuring and maintaining your own database on a virtual machine on EC2, you can rely on AWS’s expertise in managing databases as scale. You won’t need to worry about hardware upgrades, database backups, software patches, or other management tasks. This is a great option for applications that need a relational database but the team doesn’t have strong operations experience.
Amazon RDS provides a variety of database engines for you to choose from. There are five popular databases that are not AWS-specific: MySQL, MariaDB, PostgreSQL, Oracle Database, and Microsoft SQL Server. These are great options if you’re migrating an existing database to RDS and do not want to alter your function code.
In addition to the five engines above, Amazon RDS also supports Amazon Aurora. Aurora is a proprietary database built by AWS to take advantage of cloud computing. It comes in two flavors -- MySQL and PostgreSQL -- so it can take advantage of existing libraries and tooling. Amazon claims that Aurora has five times the performance of vanilla MySQL, and other tests have found Aurora is at least 3 times faster than MySQL.
Aurora is a great option if you need serious performance. Some may be concerned about vendor lock-in, given that Amazon Aurora is a proprietary database from AWS. However, Aurora is compatible with either MySQL or PostgreSQL, so you can easily move to a different hosting option if needed. The only lock-in is from the added performance benefits of Aurora.
Amazon RDS: Billing and Free Tier
Like Amazon EC2, Amazon RDS bills you hourly based on the instance type you choose. The instance types are based on EC2 instance types and have varying amounts of CPU, memory, and network bandwidth.
A general rule of thumb is that the RDS instance pricing is about 50% more than the cost for the EC2 instance. For example, the EC2 pricing for a t2.large instance in us-east-1 is $0.0928 per hour. A db.t2.large instance in us-east-1 for RDS MySQL is $0.136, or about 47% more.
While it may seem cheaper to run your own relational databases on EC2 instance, you should consider the operations and maintenance expense as well. If you don’t have significant operations capacity, you may find the total cost of ownership to be lower with Amazon RDS than with running your own databases on Amazon EC2.
In addition to the instance type you choose, there are some additional costs to be aware of. These costs are:
- Disk storage, which is charged based on a “GB-month” -- each gigabyte costs a certain amount per month. At the low end, RDS charges around $0.10 per GB-month but it will depend on the region you use.
- Backup storage, if you’re doing backups
- Data transfer costs, both in and out, if you’re communicating with your database over the public internet.
Finally, some database engines may include additional costs. If you’re using Oracle or Microsoft SQL Server, you need a license from the owners of the database technology. For both Oracle and SQL Server, AWS allows you to pay for the license on a per-hour basis as part of the instance cost of your database. For the Oracle database, AWS allows you to bring-your-own-license if you have already purchased the license directly from Oracle.
Like EC2, Amazon RDS has a nice free tier for you to test out the service. You can run a t2.micro instance for 750 hours every month -- enough to keep it running the entire month. You also get 20 GB of SSD data storage free.
A t2.micro is pretty small, with only 1 vCPU and 1 GB of RAM. You should only use it for testing or small side projects, but it’s a great way to get familiar with RDS.
When creating an RDS database in the AWS console, the setup wizard lets you check a box to indicate that you want to use the free tier. This option will help you avoid unanticipated charges by selecting the wrong instance type.
Like in Amazon EC2, the RDS free tier is only available for the first 12 months after your account has been created on AWS. Further, the free tier does not apply to Amazon Aurora or Oracle’s license-included option.
Example Projects with RDS Free Tier
Amazon RDS works well with any of your relational database needs. It is commonly used for web applications, including both custom applications and popular tools like WordPress or Drupal. Below are a few guides to get you started.
- How to use Amazon RDS with your WordPress installation
- Deploying a High-Availability Drupal Website with an External RDS Database
- The Ultimate Guide to Hosting a Java Web App on AWS
Amazon DynamoDB is a fully-managed, non-relational (or “NoSQL”) database provided by AWS. It provides predictable latencies at any scale so performance won’t degrade as your application gains in popularity.
DynamoDB was created as a fully-managed service using lessons learned from building Amazon.com and the principles contained in the Dynamo Paper. The Dynamo Paper was
written by Amazon.com engineers in 2007 to describe a highly-available, key-value database that was used internally at Amazon.com to manage the shopping cart and other high-traffic data objects.
DynamoDB offers consistently high performance, even with enormous scale. DynamoDB read times are usually less than 10 milliseconds, even with tables of over 100 GB. There is no theoretical limit on DynamoDB’s scaling capacity.
DynamoDB’s data model can be an adjustment for those coming from a traditional RDBMS system. Each DynamoDB table has a required, typed primary key which is used to uniquely identify a particular data item within a table. Beyond the primary key, you may store any additional information in optional attributes. There is no hard schema beyond the primary key, which gives you the flexibility to evolve your application over time without the need for time-consuming data migrations.
Amazon DynamoDB: Billing and Free Tier
DynamoDB is priced on two axes: data storage and provisioned throughput. Data storage pricing is pretty straight-forward: you are charged a price per GB per month. This rate varies across regions but is between $0.25 and $0.30 per GB-month in most regions.
The second pricing axis, provisioned throughput, is a little more novel. Unlike traditional, instance-based databases such as those provided by Amazon RDS, you aren’t choosing a server instance with specific CPU and memory configuration. Rather, you select how much performance you want and pay directly for that.
When selecting your provisioned throughput, you configure two things:
- Read capacity units, which allow you to read 4KB per second for each unit.
- Write capacity units, which allow you to write 1KB per second for each unit.
This is a pretty unique and powerful shift in pricing. Rather than paying for a static box and trying to squeeze as much power from it as you can, you’re paying for results. Further, you can configure your capacity based on your actual workload. If your application has far more reads than writes, you can adjust your billing accordingly. This allows for a nice relationship between your value and what you pay.
AWS provides a generous free tier for DynamoDB. You can store 25 GB per month within the free tier. Further, you can use 25 read capacity units and 25 write capacity units per month with the free tier. Fully-utilized, that would allow you to make 200 million requests to DynamoDB in a month. Even better, the DynamoDB free tier never expires -- you can keep using it even after the first 12 months of your AWS account.
Example Projects with the DynamoDB Free Tier
DynamoDB has a number of great use cases. It particularly shines with high-volume applications and with serverless architectures. Here are a few examples to get started:
- How to Create an Alexa Skill with Node.js and DynamoDB
- Build a Python REST API with Lambda and DynamoDB
- Modeling Hierarchical Data with DynamoDB
AWS Database Migration Service (DMS)
AWS DMS is a tool for migrating your existing database into an AWS-supported database. This is a great, managed option if you’re looking to make a change in your database infrastructure. AWS DMS is a flexible tool that accommodates each of these use cases. You can use it for a one-time migration, such as moving from an on-premise database to an RDS instance, or you can use it for ongoing replication, such as from a primary source to a secondary source.
You could want to make a database migration for a few reasons:
- Moving from on-prem or a different cloud into AWS;
- Moving from self-operated on EC2 to a managed solution with RDS or DynamoDB;
- Moving from one relational database (e.g. Oracle, SQL Server) to another (e.g. MySQL, PostgreSQL, or Amazon Aurora);
- Moving from one NoSQL database (e.g. Apache Cassandra) to another (e.g. DynamoDB);
- Replicating data from a primary datastore into a secondary datastore such as Amazon Redshift (for analytics) or ElasticSearch (for search).
If you’re making a switch from one database engine to another, you can use the Schema Conversion Tool with AWS DMS. This tool eases the process in switching from one engine to another, such as the small differences in schema or even the larger differences in a data model.
AWS Database Migration Service: Billing and Free Tier
AWS DMS runs on EC2 instances, so the pricing model is similar to Amazon EC2. You pay hourly for the particular instance type that you choose. There is a limited set of EC2 instance families available -- the T2,C4, and R4. For each family, it has a number of instance sizes you can choose from.
In addition to the instance cost, you’ll also pay for the attached SSD storage on a GB-month basis. You may also pay data transfer costs if you are migrating to a database that is outside AWS.
AWS DMS has a great free tier. Each DMS instance that you start is free for the first six months (183 days) provided that the target of your migration is Amazon Aurora, Amazon DynamoDB, or Amazon Redshift. You can even request an extension of up to three months if you need additional time to complete the migration. Finally, the AWS DMS free tier allows you to use some fairly large instance sizes, including a t2.large or a c4.large. This is much bigger than the typical instances that are available in the free tier.
Example Projects with the DMS Free Tier
AWS DMS is a very popular project with companies that want to move from an expensive, proprietary database like Oracle to an open solution like MySQL or PostgreSQL. More recently, it can be used to move from primary sources to secondary sources, like Elasticsearch.
Here are a few guides to using AWS DMS:
In this article, we learned about the different database offerings from AWS. For each of these offerings, we reviewed what it is, how it’s billed, and some example projects to get started. Use the AWS Free Tier for these offerings to kick-start your AWS learning and build something great!