Technology / DevOps

What is Amazon RDS and How It Works

What is Amazon RDS and How It Works picture: A
Follow us
Published on October 14, 2021

All applications need a way to store data. App developers can store data in individual files, which can be inefficient and rather cumbersome. So, databases tend to be the preferred method for data storage. Of course, databases come with other benefits, too. They aren't just good at storing data.

Building and managing application database services can be a chore, though. These extra systems must be built, maintained, and secured — on top of the application. Thankfully, we live in an age where services like managed databases are readily available. Amazon, a leader in the cloud computing space, offers a relational database service called Amazon RDS.

Let's look at Amazon RDS, what it offers, and why you should use it.

What is Amazon RDS?

Amazon RDS is AWS's relational database service. It's a fully managed relational database. There are many different types of databases. Very broadly speaking, database engines are either relational or non-relational. Of course, there are other types of databases, but they tend to be used for very specific use cases. Relational and non-relational databases are more commonly used for applications.

MySQL, Postgres, and MariaDB are examples of relational databases. Mongo is the most popular non-relational database, followed by Redis, though Redis is typically used for cache and not long-term data storage.

An Overview of Amazon RDS [VIDEO]

In this video, Bart Castle covers getting started with Amazon RDS. It is largely theoretical, with Bart focusing on the broad concepts of relational data and data storage and how Amazon RDS fits into that equation.

Why Use Amazon RDS?

The primary reason for using a database is to store data. Relational databases are the perfect tool for storing organized data. Let's discuss that a bit further.

Most applications only work with specific data sets. For example, suppose you are building a point-of-sale application for a grocery store. In that case, you need to know what types of foods the grocery store has, the product number (or SKU) of each item, the cost, and how many units the grocery store has at any given time. Your application couldn't care less about the air-speed velocity of an unladen European or African swallow. That isn't the data that you need.

Relational databases are the perfect storage mechanism for this type of related data. As an application developer, you understand what data is stored in that database. So, you can leverage the fact that the data in your database is all related and make a call to your database for a specific SKU to find a product's price.

That's one of the other benefits of a database. Database engines have built-in logic. This saves time and complexity while building an application. Though that logic can be limited, it can also be powerful. For example, it's very easy to call a relational database, like Amazon RDS, to get all products that cost between $5 and $6.

If you happen to store what products were purchased and when in your point-of-sale system, it's very easy to call your database to find out how many hotdogs were sold at your grocery store during July.

Though you could program those functions into your application, letting the database find that data for you is much easier. There's a good chance that a relational database like Amazon RDS will find that data much faster than your native code.

Amazon RDS Relies on Separation of Duty

There is also another concept called Separation of Duty. This is nothing more than separating an application's responsibilities to different systems or services. That way, an application doesn't become overburdened with all the tasks that need to be performed to keep it running.

Think of this like running a food truck. If your application did everything on its own, it would take the orders for that food truck, cook food for those orders, serve the orders, prepare food, and clean the food truck at the end of the day.

So, what if you hired one person to take orders and serve them, another to prep food early in the morning, and another to clean the food truck at the end of the day? Without those extra people, you wouldn't be able to serve many of your patrons since you handle all those responsibilities yourself. By hiring those extra people and separating responsibilities, you can now handle a larger workload, serve more guests, and earn that much more money.

This is the concept behind using a managed service like Amazon RDS. You could create your own database. That is easy enough. By managing your database service, you need to spend time and energy maintaining that database, securing it, and hosting it somewhere. With a managed service like Amazon RDS, you only need to worry about pushing data to and from the database and ensuring your data is normalized and accurate. Amazon RDS separates the duty of maintaining a database from your responsibilities as an app developer.

How Does Amazon RDS Work?

Amazon RDS is a fully managed relational database service provided by AWS. Because AWS leverages its data centers to offer so many products and computing power to consumers and businesses, it can offer RDS at a very affordable price.

Amazon RDS is built on top of the AWS EC2 platform. Essentially, an Amazon RDS instance runs inside a virtual machine on EC2, which offers all of the benefits of EC2.

For instance, Amazon RDS instances are secure. Amazon uses its IAM policy system to control who has access to each RDS instance. IAM identities must be configured and deployed by the person requesting RDS services. So, in theory, only those with those identities can access data stored in an RDS instance. Amazon handles all of the authentication and identity management of RDS instances for you.

Likewise, because RDS is built on top of EC2, it can be backed up easily. EC2 offers several backup options, including regular snapshots, which can ensure that data is always safe and secure.

In addition to that notion of security, traffic flowing to and from RDS can be filtered, too. It is very easy to configure a policy allowing only your application or a specific IP address to access an Amazon RDS instance.

Data can also be encrypted at rest within Amazon RDS. You can select which relational database engine you want to use for your RDS instance. Some engines, like Microsoft SQL, can perform row-level encryption.

Others can perform whole database encryption. Either way, data within the database itself can be encrypted. Likewise, because EC2 uses AWS EBS to store virtual machine data, the entire storage container can be encrypted, too. This is essential for any services following certain regulations like HIPAA or HITECH.

Because Amazon RDS is built on top of EC2, it can also be configured for high availability. Database instances can be replicated over multiple EC2 instances in different regions. That way, if one instance becomes unavailable, the database service can automatically fail over to another instance of that database.

Final Thoughts

Amazon RDS is a managed relational database service built on AWS EC2. Because RDS is built on top of EC2, it has access to all of the same features as EC2, such as identity management, access control, IP and access filtering, automatic snapshots, and backups. Because Amazon RDS is a managed service, things like backups and updates are handled automatically for you.

Using a service like Amazon RDS fits nicely into the separation of duties model. As an app developer, you don't want to worry about managing, securing, and building databases. You just want to worry about structuring them and using them to store data. By offloading the database administration to a managed service, you can handle more of a workload developing and administering your application instead. 


Download

By submitting this form you agree to receive marketing emails from CBT Nuggets and that you have read, understood and are able to consent to our privacy policy.


Don't miss out!Get great content
delivered to your inbox.

By submitting this form you agree to receive marketing emails from CBT Nuggets and that you have read, understood and are able to consent to our privacy policy.

Recommended Articles

Get CBT Nuggets IT training news and resources

I have read and understood the privacy policy and am able to consent to it.

© 2024 CBT Nuggets. All rights reserved.Terms | Privacy Policy | Accessibility | Sitemap | 2850 Crescent Avenue, Eugene, OR 97408 | 541-284-5522