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.