Skip to content

Everything you need before deploying the AI Gateway.


ToolVersionPurpose
miselatestTool version manager — installs all other tools automatically
uvlatestPython package manager
Terraform>= 1.9Infrastructure as code (installed via mise)
AWS CLIv2AWS operations and credential management
DockerlatestContainer builds and local testing

Terminal window
# mise
curl https://mise.run | sh
echo 'eval "$(mise activate zsh)"' >> ~/.zshrc
# uv
curl -LsSf https://astral.sh/uv/install.sh | sh

The gateway deploys the following AWS resources. Your IAM identity needs permissions to create and manage them.

ServiceResources Created
VPCVPC, subnets (2 public + 2 private), NAT Gateway, Internet Gateway, route tables
ECSFargate cluster, service, task definition
ECRContainer image repository
ALBApplication Load Balancer, listeners, target group
CognitoUser Pool, resource server, app client, domain
WAF v2Web ACL with managed rules and IP rate limiting
CloudWatchLog groups, Logs Insights queries, operational dashboard
Secrets ManagerProvider API keys (OpenAI, Anthropic, Google, Azure OpenAI)
IAMTask execution role, task role
VPC EndpointsECR (API + DKR), CloudWatch Logs, Secrets Manager, S3

For HTTPS access with a custom domain:

  1. Register or delegate a domain in Route 53 (or use an existing hosted zone)
  2. Request an ACM certificate for your domain in the same region as the deployment
  3. Set the domain variables in your Terraform tfvars file

Without a custom domain, the gateway is accessible via the ALB’s auto-generated DNS name over HTTP.


  • Outbound internet access — The ECS tasks need to reach external LLM provider APIs (api.openai.com, api.anthropic.com, etc.) via the NAT Gateway
  • VPN / network policy — If your organization restricts outbound traffic, ensure the NAT Gateway’s public IP is allowed to reach provider endpoints on port 443