Relational databases for serverless, can we use them?

Developer Advocate at AWS | Serverless <3
Search for a command to run...

Developer Advocate at AWS | Serverless <3
No comments yet. Be the first to comment.
In this guide, you will go from zero to hero in your AWS Step Functions knowledge. If you are just getting started or you are already using this service, you will find for sure something for you. The guide is free and divided into different sections ...

Serverless is a great technology to build your artificial intelligence applications, as most of the AI services that AWS provides are serverless. In this article, you will find a list of resources that can be useful when getting started building appl...

Welcome to this comprehensive guide on using Amazon Kinesis for building serverless data streaming applications. This detailed guide will cover various aspects, ranging from what are data streaming applications, to understand the different services o...

Welcome to this comprehensive guide on using Amazon DynamoDB as the database for your web application. This detailed guide will cover various aspects, ranging from hosting your web app using AWS App Runner to understanding the fundamentals of Amazon ...

This blog post collects all the resources for the talk: "Building low-latency, event-driven applications" You can watch the whole session here: https://youtu.be/vVXS7L2ez2s?si=lJcAqnqELNQd8yIG Introduction AWS re:Invent 2022 - Keynote with Dr. Wern...

A question often get asked is, if DynamoDB and noSQL databases are the only way to use serverless. When looking at all the content that is out there for serverless (and I can call myself guilty of this as well) it might seem the case for serverless beginners. However, the answer is no, you can use relational databases with serverless.
One mayor problem of relational databases engines is that they are not build for serverless. Relational database engines are build to have a fixed number of connections and when an unpredictable number of functions try to connect to them, they might run out of connections and have all kind of issues.
There are many ways around this, one is RDS proxy . RDS proxy is a new feature of AWS RDS that handle the connections to the RDS databases for you.
Another way to do relational databases in a scalable way for serverless, is to pick a database that was designed for the cloud and serverless use cases. For that you can use Amazon Aurora. Amazon Aurora is a relational database build for the cloud.
Aurora RDS comes in two flavours and one of them is fully serverless, where you don't need manage the scaling of the service at all. During reinvent 2020 it was announced version 2 of this serverless database, that solves a lot of known issues.
You can use Aurora in multiple ways from your AWS Lambda functions, one way is to use the Data API. The Data API allows you to connect to an Aurora database using an API, in a similar way that you do with DynamoDB and you don't need to manage connections. In this way using the database becomes super simple.
You can check a video I did where I build a backend with Aurora and use the Data API
Are you using Aurora database in your applications? Have you tried it already? Or you are a dynamo fan?Let me know!