AWS Builder Center

OpenAI Models on Amazon Bedrock: A Complete Guide to GPT-5.6 Sol, Terra, and Luna

OpenAI's GPT-5.6 Sol, Terra, and Luna are now generally available on Amazon Bedrock, giving AWS customers access to frontier reasoning, production, and high-volume inference models through familiar APIs with full IAM security, prompt caching at 90% discount, and pricing that counts toward existing AWS commitments. This guide covers architecture, code samples, Codex integration, Managed Agents, and model selection best practices.


Introduction

In a landmark expansion of the AWS–OpenAI partnership, OpenAI's GPT-5.6 family of models—Sol, Terra, and Luna—are now generally available on Amazon Bedrock. This represents a pivotal moment for enterprise AI adoption: for the first time, millions of AWS customers can access OpenAI's most capable frontier models through the same infrastructure, security controls, identity systems, and billing workflows they already rely on.
This blog provides a comprehensive guide to understanding what these models offer, how to get started, key architectural decisions, pricing considerations, and real-world use cases.

Background: The AWS–OpenAI Partnership

The collaboration between AWS and OpenAI was announced in April 2026 and built on a $38 billion, seven-year compute agreement signed in November 2025. Under this agreement, OpenAI gained access to hundreds of thousands of NVIDIA GB200 and GB300 GPUs hosted on Amazon EC2 UltraServers, with the ability to scale to tens of millions of CPUs.

Timeline of Availability

DateMilestone
April 28, 2026OpenAI models, Codex, and Managed Agents announced in limited preview
June 2026GPT-5.5, GPT-5.4, and Codex reach general availability on Bedrock
July 9, 2026GPT-5.6 Sol, Terra, and Luna reach general availability
July 22, 2026Stateful Runtime Environment for Agents introduced
This partnership ended OpenAI's exclusive Azure arrangement and opened frontier AI capabilities to the broader AWS ecosystem.

Meet the GPT-5.6 Family

GPT-5.6 introduces a new naming system from OpenAI. The number identifies the generation, while the names Sol, Terra, and Luna represent durable capability tiers that can advance independently.

Model Overview

ModelModel IDBest Suited ForContext WindowAWS Regions
Solopenai.gpt-5.6-solAutonomous coding, security research, scientific analysis, deep multi-step reasoning272K tokensUS East (N. Virginia), US East (Ohio)
Terraopenai.gpt-5.6-terraGeneral-purpose production workloads balancing reasoning, performance, and cost272K tokensUS East (N. Virginia), US East (Ohio), US West (Oregon)
Lunaopenai.gpt-5.6-lunaHigh-volume, latency-sensitive tasks: classification, summarization, routing272K tokensUS East (N. Virginia), US East (Ohio), US West (Oregon)

Key Capabilities

All three models share:
  • Text and image input, text output
  • 272K-token context window
  • Responses API compatibility
  • Configurable reasoning effort — none, low, medium, high, xhigh, and max
  • Tool calling support
  • Prompt caching with 90% cached-input discount

Why OpenAI on Bedrock Matters for Enterprises

1. Unified Security & Governance

OpenAI models on Bedrock inherit the full suite of AWS enterprise controls:
  • IAM-based access management — granular permissions via existing policies
  • AWS PrivateLink connectivity — private network paths, no public internet exposure
  • Amazon Bedrock Guardrails — content safety and responsible AI policies
  • Encryption at rest and in transit
  • AWS CloudTrail logging — comprehensive audit trails
  • In-Region data processing — requests stay within the specified AWS Region
Most critically, there is zero operator access during inference — security is hardware-enforced at the chip level.

2. Model Choice & Flexibility

Amazon Bedrock's core principle is that customers should choose the best model for every use case. GPT-5.6 joins an ecosystem that already includes:
  • Anthropic Claude
  • Meta Llama
  • Mistral
  • Cohere
  • Amazon Titan & Nova
  • NVIDIA Nemotron
All accessible through a single, consistent API with unified controls.

3. Simplified Procurement & Billing

  • Pricing matches OpenAI first-party rates — no markup
  • Usage counts toward existing AWS commitments (EDPs, PPAs)
  • Consolidated AI spend alongside broader AWS workloads
  • No additional infrastructure to configure

Architecture: The Bedrock-Mantle Endpoint

GPT-5.6 models are accessed through the bedrock-mantle endpoint, a next-generation inference engine purpose-built for frontier models.

Endpoint Structure

1
2
Base URL: https://bedrock-mantle.{region}.api.aws
API Path: /openai/v1/responses
The /openai/v1 path provides full OpenAI Responses API compatibility, meaning you can use the standard OpenAI Python and TypeScript SDKs with minimal changes.

Authentication Options

Option 1: Auto-Refreshing Short-Term Key (Recommended for Production)
1
2
3
4
5
6
7
8
9
from aws_bedrock_token_generator import provide_token
from openai import BedrockOpenAI

region = "us-east-1"

client = BedrockOpenAI(
aws_region=region,
bedrock_token_provider=lambda: provide_token(region=region),
)
Option 2: Environment Variable Key
1
2
3
4
5
6
7
import os
from openai import OpenAI

client = OpenAI(
base_url="https://bedrock-mantle.us-east-1.api.aws/openai/v1",
api_key=os.environ["AWS_BEARER_TOKEN_BEDROCK"],
)
Note: Short-term keys expire after 12 hours. For production workloads, always use the auto-refreshing BedrockOpenAI client.

Getting Started: Your First Inference

Basic Text Generation

1
2
3
4
5
6
7
8
response = client.responses.create(
model="openai.gpt-5.6-terra",
input="Explain the benefits of prompt caching for agentic workloads.",
max_output_tokens=512,
store=False,
)

print(response.output_text)

Controlling Reasoning Effort

For complex, multi-step problems, increase reasoning effort to let the model "think longer" before responding:
1
2
3
4
5
6
7
8
response = client.responses.create(
model="openai.gpt-5.6-sol",
input="Design a microservices architecture for a real-time fraud detection "
"system handling 10 million transactions per second.",
reasoning={"effort": "high"},
)

print(response.output_text)
Reasoning effort levels — choose based on task complexity:
LevelUse Case
noneSimple extraction, classification
lowSummarization, formatting
mediumGeneral Q&A, content generation
highMulti-step analysis, code generation
xhighResearch-level reasoning, complex debugging
maxCutting-edge problems, security research

Tool Calling

GPT-5.6 supports client-side tool calling for extending model capabilities:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import json

tools = [
{
"type": "function",
"name": "get_weather",
"description": "Get the current weather for a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "City and country (e.g., Seattle, US)",
},
"unit": {
"type": "string",
"enum": ["celsius", "fahrenheit"],
},
},
"required": ["location"],
},
}
]

# Step 1: Send request with tool definition
input_list = [{"role": "user", "content": "What's the weather in Seattle?"}]

response = client.responses.create(
model="openai.gpt-5.6-terra",
input=input_list,
tools=tools,
)

# Step 2: Carry model output (including reasoning) into next turn
input_list += response.output

# Step 3: Execute requested functions
for item in response.output:
if item.type == "function_call":
args = json.loads(item.arguments)
result = {"location": args["location"], "temperature": 64, "condition": "Partly cloudy"}
input_list.append({
"type": "function_call_output",
"call_id": item.call_id,
"output": json.dumps(result),
})

# Step 4: Get final response
final_response = client.responses.create(
model="openai.gpt-5.6-terra",
input=input_list,
tools=tools,
)

print(final_response.output_text)

Cost Optimization: Prompt Caching

For agentic and multi-step workloads, prompt caching is a game-changer. GPT-5.6 supports two caching modes:

Implicit Caching (Default)

Enabled automatically — no code changes required. Amazon Bedrock places an automatic cache breakpoint and reuses stable prompt prefixes.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
response = client.responses.create(
model="openai.gpt-5.6-terra",
prompt_cache_key="support-agent:kb-v1",
input=[
{
"type": "message",
"role": "developer",
"content": [{"type": "input_text", "text": system_prompt}],
},
{
"type": "message",
"role": "user",
"content": [{"type": "input_text", "text": "How do I configure SSO?"}],
},
],
)

Explicit Caching (For Agentic Workloads)

Mark precise cache breakpoints for full control:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
response = client.responses.create(
model="openai.gpt-5.6-terra",
prompt_cache_key="support-agent:system-prompt-v1",
prompt_cache_options={"mode": "explicit"},
input=[
{
"type": "message",
"role": "developer",
"content": [
{
"type": "input_text",
"text": system_prompt, # Must be ≥1,024 tokens
"prompt_cache_breakpoint": {"mode": "explicit"},
}
],
},
{
"type": "message",
"role": "user",
"content": [{"type": "input_text", "text": user_question}],
},
],
)

Caching Economics

Billing TypeRate
Uncached input tokensStandard rate
Cached input tokens (reads)90% discount
Cache write tokens1.25× standard rate
Key detail: Cached tokens do NOT count against your input-tokens-per-minute quota, giving you both cost and throughput benefits.

Codex on Amazon Bedrock

Codex — OpenAI's coding agent used by over 4 million developers weekly — can also route its inference through Amazon Bedrock.

Configuration

Add to ~/.codex/config.toml:
1
2
3
4
5
model = "openai.gpt-5.6-sol"
model_provider = "amazon-bedrock"

[model_providers.amazon-bedrock.aws]
region = "us-east-1"

Supported Interfaces

  • Codex CLI — terminal-based coding agent
  • Visual Studio Code extension
  • JetBrains IDE extension
  • ChatGPT Desktop App
Codex handles: writing and refactoring code, debugging, generating tests, explaining complex systems, and opening pull requests — all with inference running in your AWS account.

Amazon Bedrock Managed Agents, Powered by OpenAI

Beyond raw model access, AWS introduced Bedrock Managed Agents — a fully managed service for deploying production-ready AI agents with OpenAI frontier models.

Key Capabilities

  • Built on the OpenAI agent harness — optimized for frontier model steering
  • Agent identity — each agent operates with its own identity
  • Full audit logging — every action is logged for compliance
  • Stateful Runtime Environment — memory that persists across sessions, skills that encode procedures, and identity that enforces permissions
  • Integration with Bedrock AgentCore — compute environment, authorization policy enforcement, agent discovery, and observability

Stateful Runtime Environment

Announced on July 22, 2026, this environment provides:
  • Persistent state across agent sessions
  • Skill encoding for repeatable procedures
  • Identity-based permissions enforcement
  • Reliability and governance for production workloads

Security & Data Handling

Data Privacy Guarantees

  • Your prompts and completions are NOT used to train any models
  • Data is not shared with OpenAI unless you explicitly opt in
  • All inference runs under your IAM policies and inside your VPC

Abuse Detection

For GPT-5.6 models (as third-party models), classifier-flagged traffic is retained for up to 30 days for automated offline abuse detection. This retained data is stored and processed by AWS — not shared with OpenAI.

Hardware-Enforced Security

Zero operator access at the chip level means no one — not AWS operators, not OpenAI — can access your data during inference.

Choosing the Right Model

ScenarioRecommended ModelReasoning Effort
Production chatbot handling customer queriesTerramedium
Autonomous code generation and refactoringSolhigh/xhigh
Real-time content classification at scaleLunalow/none
Security vulnerability researchSolmax
Document summarization pipelineLunalow
Multi-step data analysisTerrahigh
Scientific research and hypothesis generationSolxhigh/max
High-volume API routing/triageLunanone
Cost-performance rule of thumb:
  • Luna — fastest, cheapest; ideal for high-volume tasks
  • Terra — balanced; half the cost of GPT-5.5 for everyday work
  • Sol — most capable; use for tasks requiring deep reasoning

Quotas & Scaling

GPT-5.6 uses on-demand inference (pay per token, no reserved capacity).

Throttling Limits

  • Per-model, per-Region quotas for input tokens per minute and output tokens per minute
  • No requests-per-minute quota
  • Cached input tokens do not count against token quotas

Best Practices for High-Volume Workloads

1
2
3
4
5
6
7
8
9
10
from aws_bedrock_token_generator import provide_token
from openai import BedrockOpenAI

region = "us-east-1"

client = BedrockOpenAI(
aws_region=region,
bedrock_token_provider=lambda: provide_token(region=region),
max_retries=6, # Exponential backoff for 429 responses
)
  • Spread large workloads across multiple minutes
  • Increase request rates gradually
  • Use prompt caching to reduce effective input token consumption
  • Leverage multiple Regions (Terra and Luna available in 3 Regions)

GovCloud Availability

For government and regulated workloads, OpenAI GPT models (including open-source variants) are also available on Amazon Bedrock in AWS GovCloud (US), meeting FedRAMP and other compliance requirements.

Conclusion

The availability of OpenAI GPT-5.6 Sol, Terra, and Luna on Amazon Bedrock marks a new era of enterprise AI. Organizations no longer need to choose between frontier model capabilities and enterprise-grade infrastructure. With:
  • ✅ Matched pricing with no markup
  • ✅ Zero infrastructure to configure
  • ✅ Hardware-enforced security with zero operator access
  • ✅ Full AWS integration (IAM, CloudTrail, PrivateLink, Guardrails)
  • ✅ Prompt caching with 90% discount
  • ✅ Codex and Managed Agents for production-ready development
...AWS customers can now build with the most capable AI models available, on the infrastructure they already trust.

Resources


This blog is based on publicly available announcements from AWS and OpenAI as of July 2026.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article