bedrock-gateway-rust
4.4K
A 100% Rust, OpenAI-compatible API gateway for AWS Bedrock — drop-in, single-binary, blazingly fast.
Point any OpenAI SDK or client at AWS Bedrock with zero code changes. Built on axum + tokio + aws-sdk-bedrockruntime — no Python, no GC, low memory, high concurrency.
reasoning_effort mappingus. / eu. / apac. / jp. / au. / ca. / global.config/*.toml, add models without recompilingrequest_id, cached_tokens, cache_hit, ttfb_msdocker run -d -p 8080:8080 \
-e API_KEY=your-gateway-key \
-e AWS_REGION=us-east-2 \
-e AWS_BEARER_TOKEN_BEDROCK=your-bedrock-api-key \
sunerpy/bedrock-gateway-rust:latest
# health check
curl http://localhost:8080/api/v1/health
# OpenAI-compatible call
curl http://localhost:8080/api/v1/chat/completions \
-H "Authorization: Bearer your-gateway-key" \
-H "Content-Type: application/json" \
-d '{"model":"us.anthropic.claude-sonnet-4-5-20250929-v1:0","messages":[{"role":"user","content":"hi"}]}'
| Endpoint | Notes |
|---|---|
POST /api/v1/chat/completions | Streaming (SSE) + non-streaming |
POST /api/v1/responses | OpenAI Responses API (codex) |
POST /api/v1/embeddings | Cohere / Titan / Nova |
GET /api/v1/models GET /api/v1/models/{id} | Catalog incl. cross-region profiles |
GET /api/v1/health | Liveness probe |
latest — most recent release0.1.0 — pinned version (amd64 + arm64)| Variable | Purpose |
|---|---|
API_KEY | Bearer token clients present to the gateway |
AWS_REGION | Bedrock region (e.g. us-east-2) |
AWS_BEARER_TOKEN_BEDROCK | Bedrock API key (or use SigV4 credential chain) |
DEFAULT_MODEL | Fallback model id |
ENABLE_PROMPT_CACHING | Auto prompt-caching (default true) |
Config is embedded in the binary (include_str!); mount CONFIG_DIR to override.
👉 github.com/sunerpy/bedrock-gateway-rust
License: MIT-0
Content type
Image
Digest
sha256:dfd515116…
Size
6.7 MB
Last updated
19 days ago
docker pull sunerpy/bedrock-gateway-rust