Skip to main content
Both ElastiCache and RDS spin up real Docker containers. They require the Docker socket to be mounted in your Floci container, and the relevant port ranges to be exposed.
volumes:
  - /var/run/docker.sock:/var/run/docker.sock

ElastiCache

Protocol: Query (XML) for management API + Redis RESP protocol for data plane
Management Endpoint: POST http://localhost:4566/
Data Endpoint: localhost:<proxy-port> (TCP, port range 6379–6399)
Floci manages real Valkey/Redis Docker containers and proxies TCP connections to them. Any Redis client works, including clients that use IAM authentication.
ActionDescription
CreateReplicationGroupStart a new Redis/Valkey cluster
DescribeReplicationGroupsList clusters and their connection info
DeleteReplicationGroupStop and remove a cluster
CreateUserCreate an ElastiCache IAM user
DescribeUsersList ElastiCache users
ModifyUserUpdate user access strings
DeleteUserRemove an ElastiCache user
ValidateIamAuthTokenValidate an IAM auth token (data-plane auth)

Configuration

floci:
  services:
    elasticache:
      enabled: true
      proxy-base-port: 6379
      proxy-max-port: 6399
      default-image: "valkey/valkey:8"

Docker Compose Setup

services:
  floci:
    image: hectorvent/floci:latest
    ports:
      - "4566:4566"
      - "6379-6399:6379-6399"   # ElastiCache proxy ports
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      FLOCI_SERVICES_DOCKER_NETWORK: my-project_default
Set FLOCI_SERVICES_DOCKER_NETWORK to the Docker network your application container uses. This allows the Valkey/Redis containers to be reachable from both Floci and your application container by hostname.

Examples

1

Create a cluster

export AWS_ENDPOINT=http://localhost:4566

aws elasticache create-replication-group \
  --replication-group-id my-cache \
  --replication-group-description "Dev cache" \
  --endpoint-url $AWS_ENDPOINT
2

Get the connection port

PORT=$(aws elasticache describe-replication-groups \
  --replication-group-id my-cache \
  --query 'ReplicationGroups[0].NodeGroups[0].PrimaryEndpoint.Port' \
  --output text \
  --endpoint-url $AWS_ENDPOINT)
3

Connect with redis-cli

redis-cli -h localhost -p $PORT ping

redis-cli -h localhost -p $PORT set mykey "hello"
redis-cli -h localhost -p $PORT get mykey
4

Delete the cluster

aws elasticache delete-replication-group \
  --replication-group-id my-cache \
  --endpoint-url $AWS_ENDPOINT

IAM Authentication

Floci supports ElastiCache IAM auth token validation. Create a user with an access string and validate tokens the same way real ElastiCache RBAC works.
export AWS_ENDPOINT=http://localhost:4566

# Create an ElastiCache user
aws elasticache create-user \
  --user-id alice \
  --user-name alice \
  --engine redis \
  --access-string "on ~* +@all" \
  --no-no-password-required \
  --endpoint-url $AWS_ENDPOINT

RDS

Protocol: Query (XML) for management API + PostgreSQL / MySQL wire protocol for data plane
Management Endpoint: POST http://localhost:4566/
Data Endpoint: localhost:<proxy-port> (TCP, port range 7001–7099)
Floci manages real PostgreSQL, MySQL, and MariaDB Docker containers and proxies TCP connections to them, including IAM authentication support. Any JDBC-compatible client or native CLI (psql, mysql) works.
ActionDescription
CreateDBInstanceStart a new database instance
DescribeDBInstancesList instances and their connection info
DeleteDBInstanceStop and remove an instance
ModifyDBInstanceUpdate instance settings
RebootDBInstanceRestart a database instance
CreateDBClusterCreate an Aurora-compatible cluster
DescribeDBClustersList clusters
DeleteDBClusterDelete a cluster
ModifyDBClusterUpdate cluster settings
CreateDBParameterGroupCreate a parameter group
DescribeDBParameterGroupsList parameter groups
DeleteDBParameterGroupDelete a parameter group
ModifyDBParameterGroupUpdate parameter group settings
DescribeDBParametersList parameters in a group

Supported Engines

EngineDefault Image
postgrespostgres:16-alpine
mysqlmysql:8.0
mariadbmariadb:11

Configuration

floci:
  services:
    rds:
      enabled: true
      proxy-base-port: 7001
      proxy-max-port: 7099
      default-postgres-image: "postgres:16-alpine"
      default-mysql-image: "mysql:8.0"
      default-mariadb-image: "mariadb:11"

Docker Compose Setup

services:
  floci:
    image: hectorvent/floci:latest
    ports:
      - "4566:4566"
      - "7001-7099:7001-7099"   # RDS proxy ports
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      FLOCI_SERVICES_DOCKER_NETWORK: my-project_default
      FLOCI_SERVICES_RDS_PROXY_BASE_PORT: "7001"
Set FLOCI_SERVICES_DOCKER_NETWORK to the Docker network your application container uses. This allows the database containers to be reachable from both Floci and your application container.

Examples

1

Create an instance

export AWS_ENDPOINT=http://localhost:4566

aws rds create-db-instance \
  --db-instance-identifier mypostgres \
  --db-instance-class db.t3.micro \
  --engine postgres \
  --master-username admin \
  --master-user-password secret123 \
  --allocated-storage 20 \
  --endpoint-url $AWS_ENDPOINT
2

Get connection details

aws rds describe-db-instances \
  --db-instance-identifier mypostgres \
  --query 'DBInstances[0].Endpoint' \
  --endpoint-url $AWS_ENDPOINT
3

Connect with psql

psql -h localhost -p 7001 -U admin

Build docs developers (and LLMs) love