Persistence layer design

In this section, we will take a look at the persistence layer (in other words, the database). As mentioned previously, we will be using Amazon RDS with the PostgreSQL engine.

In this section, you will learn about the following:

  • Creating a database using RDS
  • Connecting to the database using a command-line SQL tool
  • Creating the schema in the database

First, let's create a database instance from the console.

The following screenshots and configurations are for creating a free-tier database. The configurations are done for a dev/test use case. For production use, there are other recommended settings.
  1. Select PostgreSQL as the engine on the RDS landing page, as follows:
  1. Specify the instance details, as follows:

Get Hands-On Serverless Applications with Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.