GitHub - hectorvent/floci: Light, fluffy, and always free - AWS Local Emulator
Key Points
- 1Floci is a free, open-source local AWS emulator designed as a performant and no-strings-attached alternative to solutions like LocalStack, named after floccus cloud formations.
- 2It offers significant advantages including sub-second startup (~24 ms), minimal idle memory (~13 MiB), a small Docker image (~90 MB), and an MIT license, contrasting with LocalStack's larger footprint and upcoming restrictions.
- 3Floci can be easily deployed via `docker compose up` and integrates seamlessly with existing AWS SDKs by simply configuring the endpoint, supporting a range of AWS services for local development and testing.
Floci is an open-source, local AWS emulator designed as a no-strings-attached alternative to commercialized solutions like LocalStack's community edition. Its primary purpose is to provide a lightweight, high-performance environment for developing and testing applications that interact with AWS services, without incurring cloud costs or being subject to authentication and feature restrictions.
The core methodology of Floci involves emulating a subset of AWS API services by exposing a local HTTP endpoint, typically on port 4566. This endpoint is designed to be compatible with standard AWS SDKs (e.g., Java SDK v2, Python Boto3, Node.js SDK v3) and the AWS CLI. Users configure their AWS clients to point to http://localhost:4566 as the endpoint_url, effectively redirecting API calls from the actual AWS cloud to the local Floci instance. Credentials such as AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY can be arbitrary (e.g., "test") as Floci handles authentication internally for local access.
Technically, Floci leverages the Quarkus framework for its implementation, enabling fast startup times and low memory consumption. It offers two primary deployment options via Docker images:
- Native Image (recommended): Compiled using GraalVM Native Image technology, resulting in a standalone executable with sub-second startup times (approximately 24 ms) and minimal idle memory footprint (approximately 13 MiB). The Docker image size for the native version is significantly small (around 90 MB).
- JVM Image: A traditional Java Virtual Machine (JVM) based deployment, offering broader platform compatibility.
Floci supports various data storage modes, configurable via the FLOCI_STORAGE_MODE environment variable:
memory: Ephemeral, in-memory storage, suitable for CI/CD pipelines.persistent: Data is written to disk at a configurable path (FLOCI_STORAGE_PERSISTENT_PATH, default./data), ensuring data durability across restarts.hybrid: A combination of in-memory caching and disk persistence.wal: Write-Ahead Log, implying robust transaction handling and data recovery capabilities.
Key features and advantages highlighted include:
- Performance: Significantly faster startup times ( vs. ) and lower idle memory consumption ( vs. ) compared to alternatives.
- Lightweight: Smaller Docker image size ( vs. ).
- Zero Restrictions: No authentication tokens required, unlimited CI/CD support, and perpetual free access, contrasting with certain commercial community editions.
- API Coverage: Emulates 20+ AWS services, including core services like S3 (with Object Lock support), DynamoDB (with Streams), IAM (users, roles, policies, groups), STS (all 7 operations), API Gateway v2 (HTTP API), Cognito, ElastiCache (Redis + IAM auth), RDS (PostgreSQL + MySQL + IAM auth), Kinesis (streams, shards, fan-out), and KMS (sign, verify, re-encrypt). It boasts 408 out of 408 AWS SDK tests passing for the supported APIs, indicating high compatibility.
- Ease of Use: Deployable via
docker compose up, requiring minimal configuration for quick setup. - Licensing: Released under the MIT License, allowing for broad usage and modification.