Production-ready Terraform examples for deploying stdapi.ai — an OpenAI, Anthropic & Cohere compatible API gateway that runs in your own AWS account, in front of Amazon Bedrock and the AWS AI services (Polly, Transcribe, Comprehend). Not just chat: images, video, audio, files, embeddings, moderation and reranking. 14-day free trial included.
Start 14-Day Free Trial · Documentation · GitHub Repository
Single-region production deployment with hardened security defaults and optional monitoring.
Perfect for getting started with production workloads. Includes everything needed for secure, scalable deployment in a single AWS region.
Key Features:
- HTTPS with auto-generated ALB domain (or custom domain with Route53)
- Auto-scaling (CPU, Memory, Request-based)
- KMS encryption for all data at rest
- API key authentication
- Optional WAF protection and CloudWatch alarms
Best for: Most production workloads, quick deployment, single-region requirements
EU multi-region deployment with EU data residency controls.
Deployment that keeps model processing within the EU regions you enable. Eligible failures retry in another enabled EU region.
Key Features:
- Multi-region Bedrock access (4 EU regions: eu-west-3 Paris, eu-west-1 Ireland, eu-central-1 Frankfurt, eu-north-1 Stockholm)
- Regional S3 buckets for multimodal operations
- Region allow-list with global cross-region inference disabled
- All production features (HTTPS, WAF)
- Data residency controls for an EU-only processing footprint
Best for: Enterprise deployments, EU data residency and data sovereignty requirements
US multi-region deployment for maximum availability and performance.
Enterprise deployment leveraging multiple US regions for performance and availability. Eligible failures retry in another enabled US region.
Key Features:
- Multi-region Bedrock access (3 US regions: us-east-1, us-west-2, us-east-2)
- Regional S3 buckets for optimal performance
- Retry across enabled regions, each with its own Bedrock quota
- All production features (HTTPS, WAF)
- Maximum US availability
Best for: Enterprise deployments, US data residency, high availability requirements
Complete AI chat platform with ChatGPT-like interface, web search, RAG, and multimodal capabilities.
Full-featured deployment of Open WebUI powered by stdapi.ai. Includes web search, document processing, vector storage, and all the features you'd expect from a modern AI chat interface.
Key Features:
- Open WebUI — Feature-rich ChatGPT-like interface
- Web Search — SearXNG integration for real-time information
- Web Scraping — Playwright for content extraction
- RAG Ready — Aurora PostgreSQL with pgvector for semantic search
- Caching — Valkey (Redis-compatible) for performance
- Multimodal — TTS, STT, image generation & editing, document processing
Best for: Private ChatGPT alternative, team AI assistant, complete AI chat platform
| Example | Deployment Time | Regions | Data residency | Best For |
|---|---|---|---|---|
| Production | ~10 minutes | Single region | The region you deploy in | Most workloads, quick start |
| Production GDPR | ~15 minutes | Multi-region (EU) | EU regions only, global cross-region inference disabled | EU enterprises, EU data residency |
| Production US | ~15 minutes | Multi-region (US) | US regions only | US enterprises, high availability |
| Open WebUI | ~20 minutes | Single region | The region you deploy in | Complete chat platform, teams |
Region retry covers eligible throttling and availability failures. Streaming requests can only retry before the stream opens, and asynchronous jobs stay in the region that accepted them. Each region you enable adds its own Bedrock quota.
-
AWS Marketplace Subscription — Start 14-day free trial (includes hardened container images and commercial license)
Want to evaluate first, for free? The AGPL-3.0 Community Edition image
ghcr.io/stdapi-ai/stdapi.ai-community:latestexposes the same API at no cost — see Run locally with Docker. The commercial difference is hardening, support and license rights, not endpoints. -
Terraform or OpenTofu — Install Terraform or OpenTofu >= 1.5
-
AWS Credentials — Configure AWS credentials with appropriate permissions
-
Domain Name (optional) — A domain managed in Route53, to serve HTTPS from your own name instead of the auto-generated ALB domain. Set
alb_domain_nameinmain.tfto use it.
The stdapi.ai license is $0.10 per container-hour on the AWS Marketplace ($0.09 through a private offer), and $0 for the Community Edition image. These examples keep the module defaults, which run one task per availability zone — so a three-AZ region runs three tasks, about $216/month in license, and six in us-east-1. ALB, NAT gateways, Fargate and KMS are billed separately by AWS. Amazon Bedrock usage is billed to you directly by AWS with 0% markup.
git clone https://github.com/stdapi-ai/samples.git
cd samples/getting_started_production # or your chosen exampleNo git? Download the ZIP instead:
curl -L https://github.com/stdapi-ai/samples/archive/refs/heads/main.zip -o samples.zip unzip samples.zip && cd samples-main/getting_started_production
Follow the README in that directory for step-by-step instructions.
These deployment examples are licensed under the MIT License — see LICENSE for details.
The hardened stdapi.ai container image requires a separate AWS Marketplace subscription. The AGPL-3.0 Community Edition image is free.
Ready to deploy 100+ AI models on AWS?