Minimal setup
For most services — SSM, SQS, SNS, S3, DynamoDB, API Gateway, Cognito, KMS, Kinesis, Secrets Manager, CloudFormation, Step Functions, IAM, STS, EventBridge, and CloudWatch — a single port is all you need:http://localhost:4566. Credentials can be anything.
Full setup (with Lambda, ElastiCache, and RDS)
Lambda, ElastiCache, and RDS work by spawning real Docker containers. Floci needs access to the Docker socket to manage those containers, and their ports must be exposed to the host so your application can connect directly.Port reference
| Port / Range | Protocol | Purpose |
|---|---|---|
4566 | HTTP | All AWS API calls (every service) |
6379–6399 | TCP | ElastiCache proxy — one port per replication group |
7001–7099 | TCP | RDS proxy — one port per DB instance |
PrimaryEndpoint.Port for ElastiCache, Endpoint.Port for RDS).
Multi-container setup
When your application runs in a separate container from Floci, response URLs that containlocalhost (such as SQS QueueUrl) won’t resolve correctly inside your app container.
Add Floci to your Compose file
Define the Floci service with the
FLOCI_HOSTNAME environment variable set to its service name. This tells Floci to use that hostname when building response URLs.Configure your application container
Point your app’s AWS SDK at the Floci container using its service name as the hostname, and declare the dependency so Floci starts first.
Attach spawned containers to the same network
Lambda, ElastiCache, and RDS spawn additional Docker containers. Set
FLOCI_SERVICES_DOCKER_NETWORK to the name of the network your Compose project creates (typically <project-name>_default) so those containers can communicate with your app.Environment variable reference
| Variable | Default | Description |
|---|---|---|
FLOCI_DEFAULT_REGION | us-east-1 | AWS region in ARNs |
FLOCI_DEFAULT_ACCOUNT_ID | 000000000000 | AWS account ID in ARNs |
FLOCI_HOSTNAME | (unset) | Override hostname in response URLs |
FLOCI_STORAGE_MODE | memory | Global storage mode (memory, persistent, hybrid, wal) |
FLOCI_STORAGE_PERSISTENT_PATH | ./data | Directory for persistent storage |
FLOCI_SERVICES_LAMBDA_DOCKER_HOST | unix:///var/run/docker.sock | Docker host for Lambda containers |
FLOCI_SERVICES_LAMBDA_EPHEMERAL | false | Remove Lambda containers after each invocation |
FLOCI_SERVICES_LAMBDA_DEFAULT_MEMORY_MB | 128 | Default Lambda memory allocation |
FLOCI_SERVICES_LAMBDA_DEFAULT_TIMEOUT_SECONDS | 3 | Default Lambda timeout |
FLOCI_SERVICES_LAMBDA_CODE_PATH | ./data/lambda-code | Where Lambda ZIPs are stored |
FLOCI_SERVICES_ELASTICACHE_PROXY_BASE_PORT | 6379 | First ElastiCache proxy port |
FLOCI_SERVICES_ELASTICACHE_PROXY_MAX_PORT | 6399 | Last ElastiCache proxy port |
FLOCI_SERVICES_ELASTICACHE_DEFAULT_IMAGE | valkey/valkey:8 | Default Valkey/Redis Docker image |
FLOCI_SERVICES_RDS_PROXY_BASE_PORT | 7001 | First RDS proxy port |
FLOCI_SERVICES_RDS_PROXY_MAX_PORT | 7099 | Last RDS proxy port |
FLOCI_SERVICES_RDS_DEFAULT_POSTGRES_IMAGE | postgres:16-alpine | Default PostgreSQL image |
FLOCI_SERVICES_RDS_DEFAULT_MYSQL_IMAGE | mysql:8.0 | Default MySQL image |
FLOCI_SERVICES_RDS_DEFAULT_MARIADB_IMAGE | mariadb:11 | Default MariaDB image |
FLOCI_SERVICES_DOCKER_NETWORK | (none) | Docker network for spawned containers |
FLOCI_AUTH_VALIDATE_SIGNATURES | false | Verify AWS request signatures |