Codex now runs through Amazon Bedrock: AWS shows an IAM-based pilot with no new stack
AWS has described how to connect Codex to Amazon Bedrock without a separate model-access layer. Codex stays on the developer's machine, while model requests go through Bedrock under the same IAM, region and audit rules the company already has. AWS advises starting with sign-in via IAM Identity Center and a pilot with two people. Gateways are needed only if limits and filters in the request path itself matter.
AI-processed from AWS Machine Learning Blog; edited by Hamidun News
When a company wants to hand developers an AI coding agent, the result is usually a second infrastructure: separate keys, separate bills, separate audit. For a platform team, that is needless headache. AWS has published a detailed guide on routing Codex through Amazon Bedrock without building a parallel stack.
Codex itself still runs on the developer's workstation. Only the route changes: requests to supported OpenAI models go through Bedrock. The examples use GPT-5.6 Sol, but before you start, check separately whether Sol, Terra or Luna is available in your account, region and inference path. Availability may differ between them.
Three paths, one default
AWS offers three options.
- Native AWS Access. Sign-in via IAM Identity Center, with no additional services. This is the recommended starting point.
- AgentCore Gateway. A managed AWS gateway for routing and Bedrock Guardrails.
- LLM Gateway, such as LiteLLM on ECS or Portkey. It fits if you already run such a gateway or need hard budgets and limits in the request path itself.
AWS explicitly calls a custom integration an advanced gateway option, not a quick start. It is one more service that you have to design, secure and maintain.
The rule is simple: take the lightest path that meets your requirements. For a pilot, native access is usually enough.
What a safe pilot looks like
Employees sign in through their usual identity provider, for example Okta over SAML. The provider pushes users and groups into IAM Identity Center via SCIM, and Identity Center issues temporary AWS credentials for Codex. No identity provider is configured in Codex itself.
Verification takes three steps.
- Sign in with
aws sso loginand callbedrock-runtime conversedirectly with the target model. If something is broken, this exposes the problem right away as a profile, region or IAM-permission issue rather than a Codex issue. - Add the
amazon-bedrockprovider, the model, the profile and the region to~/.codex/config.toml. - Run a safe task in a non-production repository.
It is better to keep the config in a user-level or managed file, so that a repository cannot override the provider. Before you start, also assign someone to be responsible for rollback.
AWS also asks you to verify identity isolation. One user only proves that sign-in works. Two people run the same harmless task, and their sessions, audit records and telemetry must stay separate. Rollback is tested too: remove the setting or the Identity Center assignment, wait for the session to expire, and confirm that a new call is rejected.
Observability and cost: don't mix up the sources
The most useful thing about the guide is that it does not blend different kinds of data.
- Codex telemetry via OpenTelemetry shows client activity: tokens, turns, tool calls. It can be tied to individual people only after a local collector adds verified identity attributes.
- Bedrock metrics and logs show what happened on the service side.
- Identity and money come from AWS audit and the CUR report. For native access, CUR 2.0 with allocation by caller identity can show the SSO principal.
Token volume cannot be passed off as a spending report. Take the actual price from billing, and label any estimated allocation as an estimate.
For the pilot, the repository includes a ready-made ADOT collector configuration and a CloudWatch dashboard.
Limitations and what to do
The guide was written by an AWS platform team for its own services, so it says nothing about alternatives outside the ecosystem. Telemetry does not prove that code is correct, so review and testing of generated changes remain mandatory. Secrets and restricted data must not be sent through the model unless that is explicitly approved.
Before rolling out to teams, standardize the environment. Organization plugins distribute skills and hooks, and each one should have an owner and a version. MCP servers open a separate trust boundary: let only the right people and tools reach them, and keep credentials out of the model provider's configuration. Test hooks such as PreToolUse against allow, deny, timeout and disabled-endpoint scenarios.
The practical takeaway for a platform team is this. Start with two people, native access and a clear rollback plan. Expand only after the evidence on identity, calls and costs lines up. Add a gateway when you need hard limits, not just because it exists.
- Dec 2, 2026Amazon Releases Ergo Open Weights for Coding: 1.1 Trillion Parameters and 2,200 Tokens per Second
- Dec 2, 2026Tacit, a Startup With $93.5 Million in Funding, Built Earbuds for Silent Text Input
- Dec 2, 2026Amazon to Speed Up Ergo From 400 to 2,200 Tokens per Second and Buy 2 Million More Nvidia GPUs
- Dec 2, 2026Amazon Releases Ergo: US Open Model Closes the Gap With GPT-6.1 Terra at 38 Points
Key Questions Answered
What are the key details on Three paths, one default?
AWS offers three options. Native AWS Access. Sign-in via IAM Identity Center, with no additional services. This is the recommended starting point. AgentCore Gateway. A managed AWS gateway for routing and Bedrock Guardrails. LLM Gateway, such as LiteLLM on ECS or Portkey. It fits if you already run such a gateway or need hard budgets and limits in the request path itself. AWS explicitly calls a custom integration an advanced gateway option, not a quick start.
What a safe pilot looks like?
Employees sign in through their usual identity provider, for example Okta over SAML. The provider pushes users and groups into IAM Identity Center via SCIM, and Identity Center issues temporary AWS credentials for Codex. No identity provider is configured in Codex itself. Verification takes three steps. Sign in with aws sso login and call bedrock-runtime converse directly with the target model.
What are the key details on Observability and cost: don't mix up the sources?
The most useful thing about the guide is that it does not blend different kinds of data. Codex telemetry via OpenTelemetry shows client activity: tokens, turns, tool calls. It can be tied to individual people only after a local collector adds verified identity attributes. Bedrock metrics and logs show what happened on the service side. Identity and money come from AWS audit and the CUR report. For native access, CUR 2.0 with allocation by caller identity can show the SSO principal.
Free 2-Day Vibecoding & AI Agents Intensive
Day 1: the autonomous Hermes + DeepSeek AI agent — vibecoding and development on par with Claude Code / Codex / Gemini. Led by Jemal Hamidun, Head of AI at Alpina Digital and academic supervisor at MIPT. Right after you register with our bot Nika: the recording + 11 materials from the previous intensive.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
