Accessing OpenAI Models on Amazon Bedrock via Cross-Region Inference from Australia

0
5

Key Takeaways

  • Australian developers can now call OpenAI’s GPT‑5.6 Sol, Terra, and Luna models through Amazon Bedrock using the Asia Pacific (Sydney) ap‑southeast‑2 and Asia Pacific (Melbourne) ap‑southeast‑4 Regions.
  • The service routes requests to supported commercial AWS Regions automatically, giving access to a larger compute pool without manual destination‑region handling.
  • Three access paths are available: OpenAI Responses API, OpenAI Chat Completions API, and the Amazon Bedrock Converse API, all usable with short‑term tokens generated by the AWS Bedrock Token Generator.
  • Prompt caching (implicit by default, explicit when needed) helps cut inference costs, especially for repetitive prefixes.
  • Codex can be configured to use the Bedrock Runtime provider and authenticate via OIDC‑based AWS federation helpers, enabling secure, token‑free inference calls.
  • Usage is monitored via Amazon CloudWatch Coding Agent Insights, which visualizes token usage, request rates, cache‑hit ratios and other Codex telemetry.
  • Quotas are expressed in requests‑per‑minute (RPM) and tokens‑per‑minute (TPM); output tokens weigh heavier in the burndown calculation, so early quota increases and testing are recommended before production rollout.

Overview
Amazon Bedrock now makes the latest OpenAI GPT‑5.6 family—Sol, Terra, and Luna—available to Australian customers. As the article states, “Amazon Bedrock offers OpenAI GPT‑5.6 Sol, Terra, and Luna with global cross‑Region inference from both Asia Pacific (Sydney) and Asia Pacific (Melbourne) AWS Regions in Australia.” This means a single call to the Bedrock Runtime endpoint in either Region can be processed in any supported commercial AWS Region, sparing developers from manually managing routing. The three models differ in trade‑offs: Sol targets heavy reasoning and coding workloads, Terra balances performance and cost for everyday production, and Luna delivers fast, affordable inference for high‑volume, latency‑sensitive apps. All accept text and image inputs, generate text, and support context windows up to one million tokens.


Global Inference Profiles and Regions
The post provides a table linking each global inference profile ID to its Australian source Region. For example, global.openai.gpt-5.6-sol is sourced from Asia Pacific (Sydney) ap‑southeast‑2 and routes to “supported commercial AWS Regions.” The same pattern holds for Terra and Luna, with Melbourne using ap‑southeast‑4. The article warns that “Profile membership and model availability can change. Check Cross‑Region inference support before deployment,” reminding readers to verify the latest settings before going live.


Getting Started: Prerequisites and Verification
To begin, users need an AWS account with either Sydney or Melbourne enabled as the source Region, appropriate service control policies, an IAM role/user with permission to invoke the profiles, and Python 3.9+ plus the openai, boto3, and aws-bedrock-token-generator packages. Verification can be performed via the AWS CLI or the Bedrock console. The CLI commands shown are:

aws bedrock list-inference-profiles \
–region ap-southeast-2 \
–type-equals SYSTEM_DEFINED \
–query "inferenceProfileSummaries[?contains(inferenceProfileId, ‘openai.gpt-5.6’)].[inferenceProfileId,status]" \
–output table

and

aws bedrock get-inference-profile \
–region ap-southeast-2 \
–inference-profile-identifier global.openai.gpt-5.6-terra

In the console, selecting “Inference profiles” under “Infer” and filtering for “Global OpenAI GPT‑5.6 Terra” displays the active profile, as illustrated in Figure 1 of the original post.


Invoking GPT‑5.6 via Amazon Bedrock Runtime
GPT‑5.6 can be called through three compatible APIs. The article provides a concise example using the OpenAI Responses API:

python
from aws_bedrock_token_generator import provide_token
from openai import OpenAI

region = "ap-southeast-2"
model_id = "global.openai.gpt-5.6-terra"
prompt = ("In three short bullet points, explain how Availability Zones "
"help make an AWS application highly available.")

openai_client = OpenAI(
base_url=f"https://bedrock-runtime.{region}.amazonaws.com/openai/v1",
api_key=provide_token(region=region),
)

responses_result = openai_client.responses.create(
model=model_id,
input=prompt,
max_output_tokens=300,
)
print(responses_result.output_text)

For streaming, setting stream=True and iterating over response.output_text.delta yields real‑time output. Similar snippets are given for the Chat Completions API and the Bedrock Converse API, the latter using boto3.client("bedrock-runtime"). The post notes that to switch to Melbourne, simply change the region to ap-southeast-4.


Working with Prompt Caching
Prompt caching reduces cost by storing reusable prefixes. GPT‑5.6 on Bedrock supports two modes: implicit caching (enabled by default, requiring no code changes) and explicit caching, where developers define a reusable prefix, cache boundary, and cache key. The article refers readers to the accompanying GPT‑5.6 blog post for detailed examples, emphasizing that effective caching can substantially lower token consumption for repetitive prompts.


Setting up Codex with OIDC‑Based Authentication
Codex can leverage the same global inference profiles via the Bedrock Runtime provider. After installing the latest Codex CLI (npm install -g @openai/codex@alpha), organizations using identity providers such as Okta, Auth0, Microsoft Entra ID, Amazon Cognito, or AWS IAM Identity Center can follow the AWS OIDC Auth Helper guide. A sample ~/.aws/config entry looks like:

[profile ]
credential_process = –profile
region = ap-southeast-2
output = json

The corresponding ~/.codex/config.toml specifies the model and provider:

model = "global.openai.gpt-5.6-sol"
model_provider = "amazon-bedrock-runtime"
model_reasoning_effort = "high"

[model_providers.amazon-bedrock-runtime.aws]
profile = ""
region = "ap-southeast-2"

The helper exchanges an OIDC token for temporary AWS credentials, signs requests with SigV4, and eliminates the need to store static API keys. For Melbourne, the region field is switched to ap-southeast-4.


Quota Management
GPT‑5.6 on‑demand quotas are measured in requests‑per‑minute (RPM) and tokens‑per‑minute (TPM). Token consumption follows a burndown rate: input tokens and cache‑write input tokens count 1:1, while each output token consumes ten tokens from the quota. The post advises checking the Service Quotas console for the relevant Region (ap‑southeast‑2 or ap‑southeast‑4), requesting quota increases early, and testing representative prompts, output lengths, streaming behavior, concurrency, and peak traffic before production rollout.


Monitoring and Logging with CloudWatch Coding Agent Insights
Because GPT‑5.6 calls traverse the Bedrock Runtime API, they appear in model invocation logs alongside other on‑demand requests. Logging captures the model or inference profile ID and invocation metadata. Codex emits telemetry via OpenTelemetry (OTel) over OTLP/HTTP. To visualize this data, the article shows how to configure CloudWatch Coding Agent Insights using a Bearer token:

[otel]
environment = "production"

[otel.metrics_exporter]
otlp-http = { endpoint = "https://monitoring.ap-southeast-2.amazonaws.com/v1/metrics",
protocol = "binary",
headers = { "Authorization" = "Bearer YOUR_CLOUDWATCH_METRICS_API_KEY" } }

After inserting the generated CloudWatch metrics API key and launching Codex, users can open the CloudWatch console, navigate to GenAI Observability → Coding Agent Insights → Codex, and view a dashboard displaying token usage, request activity, cache‑hit rate, and more. For larger organizations, an enterprise rollout using a local collector that signs exports with SigV4 via federated credentials is recommended, avoiding distribution of long‑term tokens.


Conclusion
The tutorial demonstrates how Australian teams can discover and invoke GPT‑5.6 Sol, Terra, and Luna global inference profiles from the Sydney and Melbourne Regions, configure Codex to call these models through Amazon Bedrock Runtime with OIDC‑based authentication, and monitor usage via CloudWatch Coding Agent Insights. By following the provided code snippets, enabling prompt caching, verifying quotas, and setting up observability, developers can harness the latest OpenAI models securely and cost‑effectively. For precise pricing, the post directs readers to the Amazon Bedrock pricing page.

https://aws.amazon.com/blogs/machine-learning/accessing-openai-gpt-5-6-models-on-amazon-bedrock-from-australia-with-global-cross-region-inference/

SignUpSignUp form

LEAVE A REPLY

Please enter your comment!
Please enter your name here