Amazon RDS
Run real PostgreSQL and MySQL databases in Floci and connect to them from your machine, from Lambda functions or from apps in the same Docker Compose.
Features
Databases
- List databases with identifier, engine, status and size; filter by identifier
- Create a database: engine (PostgreSQL or MySQL), DB identifier, master username, optional initial database name
- Credentials: set a master password yourself, or let Floci generate it and store it in a Secrets Manager secret (
rds!db-…), with a choice of KMS key for that secret - Storage encryption with a choice of KMS key
- Actions: Stop temporarily, Start, Reboot and Delete (type
delete meto confirm; a managed master user secret is deleted too) - Status refreshes on its own while a database changes state
- Database page header: engine, status and a "Stack: X" link to the CloudFormation stack that made it
Connectivity & security tab
- Endpoint and port for Lambda functions and apps in Docker Compose
- From your machine address (
localhost:<port>) for local apps and database clients - Username, database name, and where to find the password (Retrieve in Secrets Manager for a managed secret)
- Copyable connection URLs for your machine and for Docker Compose / Lambda
- Connect card with Node.js (
pg/mysql2) and Python (psycopg/pymysql) code samples, usingDB_HOST/DB_PORTto switch addresses
Configuration tab
- Engine and version, instance class, initial database, master username
- Master credentials: self managed, or the secret ARN with Manage in Secrets Manager
- Storage encryption key and secret encryption key (link to KMS)
Logs & events tab
- Link to the database's CloudWatch Logs group (
/aws/rds/instance/<id>/error), with a copy button
Typical workflow
- On Databases, choose Create database, pick PostgreSQL or MySQL, enter a DB identifier and password, then Create database.
- Wait for Available, then open the Connectivity & security tab.
- Copy the URL from your machine into your database client or local app's settings.
- For a Lambda function, set
DB_HOSTandDB_PORTto the Endpoint and Port shown on the same tab.
Works with
- AWS Secrets Manager: holds the master password when Floci manages it
- AWS KMS: encrypt storage and the master user secret with your own key
- AWS Lambda: functions reach the database through its endpoint
- Amazon EC2: apps inside an instance reach the database through its endpoint
- Amazon CloudWatch Logs: Floci writes the database's output to a log group
- AWS CloudFormation: the database page links to the stack that created it
Limitations
- The endpoint Floci returns only works from Lambda and containers in the same Docker Compose; from your machine use
localhost:<port>(From your machine). Apps on your machine that read the host from a secret or parameter must override it the same way. - Floci reports Available as soon as the container runs; MySQL needs a few more seconds before it accepts logins.
- The first database of each engine is slow to create because Floci downloads the image; it fails offline.
- Stopping a database doesn't restart it after 7 days as on AWS: start it again from Actions.
- Deleting a database leaves its Docker volume behind.
- Floci accepts master passwords AWS rejects; the create form checks the AWS rules itself.
- A database created by CloudFormation has no engine version, and Floci ignores
ManageMasterUserPasswordthere (nords!secret). - After Reset data the database containers keep running; run
docker compose restart floci, or a new database can fail to start on port7001. - Don't set
FLOCI_SERVICES_RDS_ENDPOINT_HOST=localhoston Floci: Lambda functions then can't reach the database.