Skip to content

JesseKoldewijn/openstack

Repository files navigation

openstack

CI Docker License: MIT Rust Docker Image

Work in progress. openstack is under active development. APIs may be incomplete, behaviour may differ from AWS or LocalStack in edge cases, and breaking changes may occur between releases. Production use is not recommended at this time.

A Rust reimplementation of LocalStack Community Edition — a 100% API-compatible, drop-in replacement for the Python original.


Service Coverage

Full service coverage table (click to expand)
Service Status Protocol
Account Management not implemented
Amplify not implemented
API Gateway ✅ supported rest-json
AppConfig not implemented
Application Auto Scaling not implemented
AppSync not implemented
Athena not implemented
Auto Scaling not implemented
Backup not implemented
Batch not implemented
Bedrock not implemented
Certificate Manager (ACM) ✅ supported json
Cloud Control not implemented
CloudFormation ✅ supported query (XML)
CloudFront not implemented
CloudTrail not implemented
CloudWatch (metrics + alarms) ✅ supported json
CloudWatch Logs ✅ supported json
CodeArtifact not implemented
CodeBuild not implemented
CodeCommit not implemented
CodeConnections not implemented
CodeDeploy not implemented
CodePipeline not implemented
Cognito not implemented
Config not implemented
Cost Explorer not implemented
Data Firehose ✅ supported json
Database Migration Service (DMS) not implemented
DocumentDB (DocDB) not implemented
DynamoDB ✅ supported json
DynamoDB Streams ✅ supported json
EC2 ✅ supported ec2 query
ECR ✅ supported json
Elastic Beanstalk not implemented
Elastic Container Service (ECS) not implemented
Elastic File System (EFS) not implemented
Elastic Kubernetes Service (EKS) not implemented
Elastic Load Balancing (ELB) not implemented
Elastic MapReduce (EMR) not implemented
ElastiCache not implemented
Elasticsearch Service not implemented
Elemental MediaConvert not implemented
EventBridge ✅ supported json
EventBridge Pipes not implemented
EventBridge Scheduler not implemented
Fault Injection Service (FIS) not implemented
Glacier not implemented
Glue not implemented
Identity and Access Management (IAM) ✅ supported query (XML)
Identity Store not implemented
IoT not implemented
IoT Data not implemented
IoT Wireless not implemented
Key Management Service (KMS) ✅ supported json
Kinesis Data Streams ✅ supported json
Lake Formation not implemented
Lambda ✅ supported json + Docker
Managed Blockchain (AMB) not implemented
Managed Service for Apache Flink not implemented
Managed Streaming for Kafka (MSK) not implemented
Managed Workflows for Apache Airflow (MWAA) not implemented
MemoryDB not implemented
MQ not implemented
Neptune not implemented
OpenSearch Service ✅ supported rest-json
Organizations not implemented
Pinpoint not implemented
Private Certificate Authority (ACM PCA) not implemented
Redshift ✅ supported query (XML)
Relational Database Service (RDS) not implemented
Resource Access Manager (RAM) not implemented
Resource Groups not implemented
Resource Groups Tagging API not implemented
Route 53 ✅ supported rest-xml
Route 53 Resolver not implemented
S3 ✅ supported rest-xml
S3 Tables not implemented
SageMaker not implemented
Secrets Manager ✅ supported json
Security Token Service (STS) ✅ supported query (XML)
Serverless Application Repository not implemented
Service Discovery not implemented
Shield not implemented
Simple Email Service (SES) ✅ supported query (XML)
Simple Notification Service (SNS) ✅ supported query (XML)
Simple Queue Service (SQS) ✅ supported query (XML)
Simple Workflow Service (SWF) not implemented
SSO Admin not implemented
Step Functions ✅ supported json
Support not implemented
Systems Manager (SSM) ✅ supported json
Textract not implemented
Timestream not implemented
Transcribe not implemented
Transfer not implemented
Verified Permissions not implemented
Web Application Firewall (WAF) not implemented
X-Ray not implemented

The table lists every service in LocalStack's Community Edition and the current implementation status in openstack.


Quick Start

Prerequisites

  • Rust stable toolchain (edition 2024; Rust 1.85+)
  • Docker (recommended for running the published image and Lambda container execution)

Docker (recommended)

docker run --rm -p 4566:4566 ghcr.io/jessekoldewijn/openstack:latest

Docker Compose

docker compose up

The API endpoint is http://localhost:4566. All AWS services are accessible on the same port (edge proxy routing).

Binary

cargo build --release
./target/release/openstack

Usage with AWS CLI

Point any AWS CLI command at the local endpoint:

aws --endpoint-url http://localhost:4566 s3 mb s3://my-bucket
aws --endpoint-url http://localhost:4566 sqs create-queue --queue-name my-queue
aws --endpoint-url http://localhost:4566 dynamodb list-tables

Or use awslocal (a thin wrapper that injects the endpoint automatically):

pip install awscli-local
awslocal s3 mb s3://my-bucket
awslocal sqs create-queue --queue-name my-queue

Configuration

openstack is configured entirely through environment variables, fully compatible with LocalStack's variable names:

Variable Default Description
GATEWAY_LISTEN 0.0.0.0:4566 Bind address(es) for the HTTP gateway
LOCALSTACK_HOST localhost.localstack.cloud:4566 Hostname used in generated URLs
SERVICES (all) Comma-separated list of services to enable
PERSISTENCE 0 Enable state persistence to DATA_DIR
DATA_DIR /var/lib/localstack Directory for persisted state
LS_LOG info Log level (trace, debug, info, warn, error)
DEBUG 0 Enable debug mode (exposes /_localstack/diagnose)
DNS_ADDRESS 0.0.0.0 DNS server bind address
DNS_PORT 53 DNS server port
DNS_RESOLVE_IP 127.0.0.1 IP that *.localhost.localstack.cloud resolves to
LAMBDA_KEEPALIVE_MS 600000 How long to keep warm Lambda containers alive
LAMBDA_REMOVE_CONTAINERS 1 Remove containers after invocation
SNAPSHOT_SAVE_STRATEGY ON_SHUTDOWN When to flush state to disk
SNAPSHOT_LOAD_STRATEGY ON_STARTUP When to load persisted state
ALLOW_NONSTANDARD_REGIONS 0 Allow arbitrary region names
EAGER_SERVICE_LOADING 0 Start all services at boot instead of lazily

Internal API

The following management endpoints are available (LocalStack-compatible):

Endpoint Description
GET /_localstack/health Service states, edition, version
HEAD /_localstack/health Liveness probe (200 OK)
GET /_localstack/info Version, uptime, session ID
GET /_localstack/init Init script execution status
GET /_localstack/plugins Registered service providers
GET /_localstack/diagnose Config + diagnostics (DEBUG=1 only)
GET /_localstack/config Runtime config read/update

Workspace Structure

crates/
├── openstack/          Binary entry point
├── config/             Environment variable parsing
├── gateway/            Axum/Hyper HTTP server + handler chain
├── aws-protocol/       AWS wire protocol parsers/serializers
├── service-framework/  Provider trait, lifecycle, plugin manager
├── state/              AccountRegionBundle, persistence, snapshots
├── internal-api/       /_localstack/* management endpoints
├── dns/                Embedded hickory-dns server
├── studio-ui/          Web management UI (Node/TypeScript)
├── services/           One crate per AWS service (24 crates, 26 APIs)
└── tests/integration/  Integration test harness

Development

# Build
cargo build

# Run tests
cargo test --workspace

# Lint
cargo clippy --all-targets --all-features -- -D warnings
cargo fmt --all -- --check

# Run locally
GATEWAY_LISTEN=127.0.0.1:4566 LS_LOG=debug cargo run

Cross-compilation

# Linux x86_64
cross build --release --target x86_64-unknown-linux-gnu

# Linux arm64
cross build --release --target aarch64-unknown-linux-gnu

License

MIT — see LICENSE.

About

A rust-based localstack drop-in replacement.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages