If you want to use a database with Rails and Lambda, I would highly suggest using DynamoDB with the excellent AWS Record gem. It leverages simple
ActiveModel conventions and DynamoDB is a perfect companion for serverless.
Still love ActiveRecord? We got you covered! For smaller applications with variable workloads on MySQL, you can use the ActiveRecord Adapter for Amazon Aurora Serverless which leverages the Data API over HTTP.
Databases with Lambda is a big fun topic. Here are a few links to help you learn more.