Introduction

Amazon offers many database solutions within AWS. From relational databases to NoSQL solutions, data warehouses and data lakes, there is no end to the options available for you to host your database.

Database hosting methods

Depending on the type of database you would like to deploy, Amazon offers you many cloud-native, managed service or virtual server solutions.

The first option available to AWS users is installing a database server on a standard EC2 instance. If you do this, you will see no difference to running any other database server. This gives you full control over the operating system and database server settings. 

Unfortunately, this comes with many potential downsides. First, you will be fully responsible for all configurations and maintenance of the database, while many AWS services automate some or all of these issues. Secondly, and more importantly, you will gain none of the benefits of a cloud solution. Scaling to accommodate increased traffic will be difficult or impossible, and keeping the database available when performing maintenance will also provide challenges.

Next, Amazon offers their Relational Database Service (RDS). RDS is a managed service for your relational databases. Unlike with running a database on an EC2 instance, Amazon will take care of the operating system and underlying configurations. You simply need to specify a few settings (CPU size, amount of memory and so on) and Amazon will manage the rest. You will also gain access to several benefits of being in the cloud, such as the ability to easily run your database in multiple availability zones for redundancy and the ability to scale up your database server size to support increased traffic. 

This comes with a few limitations as well: with Amazon managing the hardware and key configurations, you will not be able to customize quite as many settings as your own installation. For all but a few extremely specialized databases, this is a good trade-off. Utilize RDS when possible.

Finally, AWS has several completely cloud native database solutions. With options such as Redshift for data warehousing and DocumentDB and DynamoDB for NoSQL solutions, you will be able to find a solution for your needs. The advantages of a cloud-native solution for hosting your database are scalability and reliability. A cloud native solution is capable of expanding to meet demand for your application, and many large enterprises use these solutions to store petabytes of data.

AWS Aurora

Open-source relational databases such as MySQL can be used without a licensing fee, while proprietary databases like Microsoft SQL and Oracle require you to pay for a software license as well as pay for the server it is running on. Open-source databases will therefore be much more economical.

Unfortunately, open-source databases often come with other drawbacks. These databases will regularly not be able to handle as many input/output operations per second as proprietary solutions and will also have fewer options for scaling to handle extremely large amounts of traffic.

In order to solve these limitations of open-source databases, Amazon developed a new relational database named Aurora. Aurora is fully compatible with both MySQL and PostgreSQL databases, allowing you to easily import your already-existing databases into AWS with AWS Database Migration Service. Once you are using Aurora, you will gain many of the advantages of a proprietary database (such as the scalability and redundancy often missing from the open-source options) with lower costs.

Redshift

If you work in a large enterprise environment, you may find the need to analyze and report on many different sources of data. Querying months or years of data from your live databases can cause serious slowdowns and locks on your production systems. 

One method to solve this problem is to create a data warehouse. A data warehouse is a repository of historical data your users can query and not affect your production environment. Amazon offers Redshift as a cloud-hosted data warehouse. Using other AWS services such as Quicksight, Sagemaker or Athena, you will be able to create ad hoc or regular reports on the data to find insights.

DynamoDB

If you are looking to run a NoSQL solution, AWS offers DynamoDB. DynamoDB is a serverless, auto-scaling NoSQL database that allows both key-value and document usage. Like other NoSQL solutions such as Redis or MongoDB, DynamoDB is not a relational database like Aurora or Microsoft SQL. 

While traditional relational databases are very good for structured data, or data types which are the same for all entries, NoSQL solutions are much better at handling data of different types with little to no structure. Additionally, NoSQL solutions such as DynamoDB often allow you to scale to handle larger amounts of traffic to your application better than a traditional relational database.

Database security

Often, an application’s most sensitive data is stored within databases. Customers’ names, addresses and credit card numbers could all be stored within your application. Therefore, it is necessary to guarantee that your database is secure. Depending on the database type and hosting method you use, AWS offers a variety of methods to secure your database.

As with other AWS services, you can restrict access to your database servers or services through IAM Users and Roles. You can also restrict the resources that may contact your databases and the ports which they may be contacted over through the use of Security Groups and Access Control Lists.

While AWS offers these additional protections, you should still protect your databases as you would if you were running them on local hardware. Your databases should be secured with a strong password. If you are storing sensitive or personal information within the database, your database should be encrypted. 

Finally, if you are hosting your database on an EC2 Windows or Linux instance, you will need to ensure that your operating system is updated and secured as normal. This bit is not needed if you are using a cloud-native solution such as RDS.

Conclusion

No matter the database type you wish to use, with some analysis and foresight you will be able to find a solution in AWS to host your database securely, reliably and economically. 

 

Sources

  1. Amazon Aurora, AWS
  2. What is Amazon Redshift?, AWS
  3. What Is Amazon DynamoDB?, AWS
  4. Security in Amazon RDS, AWS

Be Safe

Section Guide

Robert
Johnson

View more articles from Robert

As you grow in your cybersecurity career, Infosec Skills is the platform to ensure your skills are scaled to outsmart the latest cyber threats.

Section Guide

Robert
Johnson

View more articles from Robert