Can i create database per user on AWS RDS for MYSQL?

Viewed 48

I'm creating an application where each business will have;

  1. owner which is a user at some-business-name database,
  2. Some information about the business (This part will actually change my app's UI)
  3. employees(Also users same as owner)
  4. permissions (for employees. permissions for owner can't changed)
  5. customers (Every business have customers) ... and such

I need a new database for each business with a unique business name for database name

Is there a limit to the number of databases in AWS RDS for MYSQL? if so how can i solve this problem?

NOTE: I have to create this application using aws

1 Answers

Take a look at the FAQs for RDS, looking at the "How many databases or schemas can I run within a DB instance?" section. According to that:

RDS for MySQL: No limit imposed by software

EDIT

You asked in the comments if this is suitable for your application. I have personally always found the "one environment per client" setup to be challenging. You must have good database upgrade scripts and code practices. Debugging a single client means understand the code that they run and the schema that they have. A multi-tenant solution can be easier but comes with it's own set of challenges when partitioning database data between customers. Yes, your solution will work. You don't mention the server side other than the CDK but if you're going to also partition the code this way it becomes very difficult to know which client is running what software.

Regardless of how you decide to do this keep good information about each client and what version of the software and the database they are using. Hopefully the software you're using auto-updates schemas as needed.

Related