Hi Reader ππ½
Tobi & I took 3-days off of our full-time jobs, sat together and created content in full focus mode. In the upcoming weeks you will see a lot more visual content like Infographics, Cheatsheets, and blog posts.
This newsletter edition is all about πΎ Databases & Storage on AWS. You have endless options on AWS for using different services for persisting your data. This post will give you an introduction to the three most important services in this area.
DynamoDB was already covered in the last issue but we actually wanted to go one step back and provide you an overview of these three services.
We'll provide you with one example use case for every service. With that you should be able to understand when to use which service.
One thing all three services have in common is that they are fully-managed by AWS. As weβve already learned in previous newsletters it is a good idea to hand over as much of the infrastructure responsibility to AWS. You can focus on your actual business logic of your application. AWS takes care of the rest.
RDS is a fully managed SQL database service. With RDS your deployments, scaling, migrations, and backups can easily be done and AWS takes care of that for you.
RDS is offering you to build a SQL (Structured Query Language) database. SQL databases are especially useful for doing so-called OLAP use cases. OLAP means Online Analytical Processing. A typical OLAP process includes aggregation operations such as:
A good example for that is analyzing your web data. Let's take the following example:
A user visits our landing page => An API is called that is handled by a Lambda function. The Lambda function adds an entry into RDS with the following data:
If you now want to analyze how many page-views you had in the last 7 days, you can execute a SQL query to get that result:
This is a typical OLAP use case.
DynamoDB on the other hand is a so-called NoSQL Database. It is optimized for Online Transaction Processing (OLTP) workloads.
OLTP workloads especially involve a high load of incoming traffic. DynamoDB automatically scales with you on this traffic. A typical example is the insertion of a high number of IOT sensors into DynamoDB via DynamoDB streams.
One amazing capability of DynamoDB is that its pricing is to 100% usage based. That means if you don't use it you won't pay 1 ct.
DynamoDB saves your data in a JSON format. One of the major differences to RDS is that DynamoDB doesn't follow a schema while inserting data. That means that there are no enforced constraints by the database engine about how the data has to look like. If you need to insert a new field, you can write it immediately.
This doesn't mean that there is no schema. Your application still follows an implicit schema definition, as it expects the data to be in a given format.
The last service we are introducing is S3. S3 is one of the most popular services of AWS out there.
S3 has one of the highest durability rates of 99.999999999%. Combined with an uptime Service-Level Agreement of 99.99%, your data is save and always available.
S3 is mostly used for saving BLOBs (Binary Large Object). Typical BLOB objects are:
S3 is not a database. It is a storage option. S3 lets you create buckets and objects within these buckets. S3 has no upper limit of storage size. You can save as much as you want in a bucket.
A typical S3 use case is hosting a static website. You can save your HTML file, images, and all assets in a bucket. Put a CloudFront distribution in front that will serve your files and your hosting is done.
β
Thats all about our recommend database & storage options on AWS. One amazing thing about AWS databases is that they offer purpose built database. You have even more options to choose from:
... to name just a few. We see that many people get overwhelmed with the sheer number of database options. That is why we recommend sticking to the three storage options of this newsletter from the beginning and focusing on mastering those first.
Let us know what you think. Are you interested in any other database solutions?
Reply to this email and send us your comments.
See you in two weeks ππ½
Tobi & Sandro
β
β
Join our community of over 9,300 readers delving into AWS. We highlight real-world best practices through easy-to-understand visualizations and one-pagers. Expect a fresh newsletter edition every two weeks.
Hey Reader ππ½ This issue will be about a recent real-world experience that just went off right with the new year! π Once upon a time... π¦ It all started in September 2024 where Edgio, the main CDN provider we used for one of my large enterprise projects, filed for bankruptcy. Edgio was natively integrated into Azure, allowing you to use it without leaving the Azure ecosystem. It also featured a powerful rules engine (allowing for all kinds of conditions, redirects and rewrites) and didnβt...
β Reading time: 13 minutes π Main Learning: How to Run Apps on Fargate via ECS πΎ GitHub Repository βοΈ Read the Full Post Online π Hey Reader ππ½ When building applications on AWS, we need to run our code somewhere: a computation service. There are a lot of well-known and mature computation services on AWS. Youβll often find Lambda as the primary choice, as itβs where you donβt need to manage any infrastructure. You only need to bring your code - itβs Serverless β‘οΈ. However, more options can be...
β Reading time: 10 minutes π Main Learning: Running Postgres on Aurora DSQL with Drizzle πΎ GitHub Repository βοΈ Read the Full Post Online π Hey Reader ππ½ With re:Invent 2024, AWS finally came up with an answer to what many people (including us) asked for years: "What if there were something like DynamoDB but for SQL?" With Amazon Aurora DSQL, this is finally possible. Itβs not just a βscales-to-zeroβ solution like Aurora Serverless V2. It is a true distributed, serverless, pay-per-use...