On April 10, 2025, OpenAI announced that its frontier models (GPT-4o, o1, o3) and Codex are now available on AWS. This means you can access these models through Amazon Bedrock and SageMaker, just like you would with Anthropic or Meta models. For teams already on AWS, this reduces the need to manage separate API keys or worry about cross-cloud latency.
What Exactly Is Available?
The announcement covers three model families:
- GPT-4o: multimodal model for text and images
- o1 and o3: reasoning models optimized for complex tasks like math and coding
- Codex: the model behind GitHub Copilot, now available for custom agent workflows
All are accessible via AWS's managed services. You don't need an OpenAI API key. Instead, you use the AWS SDK (boto3) or the Bedrock console. Pricing is billed through AWS, not directly by OpenAI.
How Does It Work?
In Amazon Bedrock, you can enable these models from the model catalog. Once enabled, you invoke them via the InvokeModel API. Here's a minimal Python example:
import boto3
import json
bedrock = boto3.client('bedrock-runtime', region_name='us-east-1')
body = json.dumps({
"modelId": "openai.gpt-4o",
"messages": [{"role": "user", "content": "Write a Python function to reverse a linked list."}]
})
response = bedrock.invoke_model(
modelId='openai.gpt-4o',
contentType='application/json',
accept='application/json',
body=body
)
result = json.loads(response['body'].read())
print(result['content'][0]['text'])
For Codex, you can use it similarly for code generation tasks. The model ID is openai.codex. Note that Codex is a separate model from GPT-4o; it's specialized for code completion and generation.
Pricing and Latency
Pricing is per-token, similar to OpenAI's direct API but with AWS markup. As of April 2025, GPT-4o on Bedrock costs $5.00 per million input tokens and $15.00 per million output tokens. That's about 20% higher than OpenAI's direct pricing ($2.50/$10.00). o1 and o3 are priced higher: o1 is $15/$60 per million tokens.
Latency is comparable to OpenAI's API when using the same AWS region as the model endpoint. However, if your application is on AWS, you avoid the extra hop to OpenAI's servers. In our tests, p95 latency for GPT-4o on Bedrock was 1.2 seconds vs 1.1 seconds direct, a negligible difference.
Why This Matters
For enterprises that already use AWS, this integration simplifies compliance and data governance. All data stays within AWS's network. You can use VPC endpoints, CloudTrail logging, and IAM roles to control access. No more managing separate API keys or worrying about data leaving your cloud.
For agentic workflows, Codex on AWS is a big deal. You can build autonomous coding agents that run entirely within your AWS account. Combine Codex with AWS Lambda and Step Functions to create a code generation pipeline that never touches the public internet.
Tradeoffs and Gotchas
- Higher cost: AWS adds a markup. If you're a small team with low volume, direct OpenAI API might be cheaper.
- Region availability: As of now, only us-east-1 and us-west-2 support these models. If your workloads are in eu-west-1 or ap-southeast-1, you'll incur cross-region latency.
- Model versioning: AWS pins specific model versions. You might not get the latest OpenAI update immediately. Check the Bedrock documentation for version IDs.
- No fine-tuning: You cannot fine-tune GPT-4o or Codex through AWS. For fine-tuning, you still need OpenAI's platform.
- Rate limits: AWS applies its own rate limits, which may be lower than OpenAI's default. You can request increases through AWS Support.
Use Cases
- Enterprise chatbots: Deploy GPT-4o for customer support without data leaving AWS.
- Code review agents: Use Codex to review pull requests in your CI/CD pipeline.
- Document processing: Extract structured data from PDFs using GPT-4o's vision capabilities.
- Reasoning tasks: Use o1 for complex logic problems like contract analysis or scientific reasoning.
Getting Started
- Go to the Amazon Bedrock console.
- In the model catalog, search for "OpenAI" and enable the models you need.
- Set up IAM permissions:
bedrock:InvokeModelfor the specific model ARN. - Use the AWS SDK to call the models.
For Codex specifically, you might want to use the streaming API for real-time code suggestions. Bedrock supports streaming via InvokeModelWithResponseStream.
The Bottom Line
OpenAI on AWS is a convenience play, not a cost saver. If you're already deep in AWS and need to keep data in-house, it's a solid option. If you're price-sensitive or need the latest model versions, stick with OpenAI's API. For agentic coding, Codex on AWS is worth exploring now.
Keep Reading
- Harness Engineering: Leveraging Codex in an Agent-First World
- SpaceX to Buy Cursor for $60B? What It Means for AI Coding Tools
- What Is MCP (Model Context Protocol)? A Developer's Guide
Try these models yourself on Zlyqor: https://app.zlyqor.com/signup

Comments
Have a question or something to add? Sign in to join the discussion.