AI Cloud Architect

Set up OpenAI ChatGPT Codex with LiteLLM on Amazon ECS and Amazon Bedrock

AWSHow-to by Nick McCarthy, Sunil Bemarkar and Sudeesh SasidharanAWS Artificial Intelligence Blog

Deploy a customer-operated LiteLLM gateway on Amazon ECS with AWS Fargate, connect it to an OpenAI model on Amazon Bedrock, and configure Codex to route requests through the gateway’s Responses API with scoped identities, budgets, rate limits, and telemetry. We also compare direct IAM Identity Center access and a managed Portkey deployment.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

A step-by-step guide to run a LiteLLM gateway on ECS Fargate in your AWS account, so Codex sends model calls through it to an OpenAI model on Bedrock with scoped keys, budgets and rate limits.

Who it is for

Platform teams rolling out Codex to developers on AWS that need per-user budgets, rate limits and gateway-level attribution.

Key points

  • Validated in us-east-1 with the openai.gpt-5.5 alias; model availability varies by account and Region.
  • Deployment creates billable resources: ALB, Fargate tasks, RDS, WAF, logs and inference.
  • Compatibility is checked with a probe covering Responses API continuation, streaming and function calls.
  • Post compares this with direct IAM Identity Center access and a managed Portkey option.

The same at other vendors

Different approach

GoogleHow-to

Model routing with Google Cloud API Gateway

AI:Both route OpenAI-compatible model calls through a gateway, but Google's is a managed API Gateway feature while the item uses the open-source LiteLLM route.

Timeline

  1. Read firstStreamline AI operations with the Multi-Provider Generative AI Gateway reference architecture · AWS · Blog post
  2. What it explainsOpenAI models and Codex on Amazon Bedrock are now generally available · AWS · Announcement
  3. This postSet up OpenAI ChatGPT Codex with LiteLLM on Amazon ECS and Amazon Bedrock
  4. What it explainsOpenAI Codex on Amazon Bedrock · AWS · How-to

Go deeper