
Virgil Ennes
· 9 min read
Configure the ChatGPT desktop app with Amazon Bedrock in AWS GovCloud (US)
The ChatGPT desktop app is now available on Amazon Bedrock in AWS GovCloud (US), providing access to OpenAI’s frontier models through two components. Work completes complex, multi-step tasks and delivers review-ready results, and Codex is a coding agent for developing, testing, and reviewing software.
This walkthrough is intended for organizations whose security architecture requires model inference to use AWS GovCloud (US) identities, endpoints, and Regional controls. It configures Codex to route model requests through Amazon Bedrock Mantle in us-gov-west-1, where access can be governed using AWS Identity and Access Management (IAM) and existing AWS GovCloud (US) network controls.
Codex is the OpenAI coding agent for AI-powered software development. With GPT models powering inference, Codex introduces a new class of intelligence optimized for complex, long-horizon developer workflows. You can use the ChatGPT desktop app, the Codex CLI, and IDE integrations with Visual Studio Code, JetBrains, and Xcode. Model inference is routed through the Responses API on Amazon Bedrock.
For customers with data residency requirements, processing stays within the Amazon Bedrock AWS Region that you select. You pay per token with no seat licenses and no per-developer commitments. Zero data retention (ZDR) is also supported. In this configurable mode, prompts and responses are processed without being written to durable storage by AWS or shared with model providers. This helps you protect sensitive information and meet stringent data-governance, privacy, and security requirements.
This post walks through a controlled local deployment of the ChatGPT desktop app that sends model inference to Amazon Bedrock in AWS GovCloud (US-West). The configuration uses API-mode sign-in, a managed device policy, a named AWS profile, and network restrictions. These restrictions allow access only to the approved Amazon Bedrock endpoint while disabling other external connections and network-enabled capabilities. The result is a deployment that an agency security team can test and document before approving broader use.
Using AWS GovCloud (US) and following this guide do not, by themselves, authorize your workload. Your organization remains responsible for reviewing the selected model, AWS services, Region, endpoint, workstation controls, repositories, credentials, and data flows against its system security plan and authorization process.
Solution overview
You can use the ChatGPT desktop app in two ways:
- Work for larger tasks that need planning, research, files, and a finished result.
- Codex for technical work such as editing code, running tests, and reviewing pull requests.
The ChatGPT desktop app runs on an organization-managed computer through the desktop app or CLI. It uses the configured AWS credentials to securely send requests to the Amazon Bedrock Mantle endpoint in us-gov-west-1. Because this setup uses AWS directly, ChatGPT workspace rules and user roles don’t control it. The main security controls are the computer’s policies and the AWS identity and permissions being used.
Walkthrough
The configuration has three main steps: set up authentication, set up the ChatGPT desktop app configuration files, and then launch, initialize, and verify the deployment.
Prerequisites
Before setting up the ChatGPT desktop app with AWS GovCloud (US), make sure your version of the ChatGPT desktop app supports Amazon Bedrock in AWS GovCloud (US). You need an approved AWS GovCloud (US) account, an IAM identity and approved credentials, access to the approved model, AWS Region, and endpoint, and permission to use them. You also need to set up the requirements.toml and config.toml files.
Step 1: Set up authentication
Select the approved AWS GovCloud (US) account and IAM identity or role with access to the approved model in us-gov-west-1. Obtain credentials through your organization’s approved mechanism. This walkthrough uses the named profile codex-il5. Keep credentials, bearer tokens, session tokens, and other secrets out of TOML files.
Protect the profile configuration, credential source, SSO token cache, and any credential helper from ChatGPT desktop app task writes, while allowing approved authentication tools to maintain and refresh credentials.
The ChatGPT desktop app supports two Amazon Bedrock authentication pathways: an Amazon Bedrock API key or the AWS SDK credential chain. AWS SSO through AWS IAM Identity Center is supported within the credential-chain pathway.
The app first checks for AWS_BEARER_TOKEN_BEDROCK in its environment. For desktop use, this variable can be supplied through %USERPROFILE%\.codex\.env on Windows or ~/.codex/.env on Linux and macOS. When present, the bearer token takes precedence over profile-based authentication.
If no bearer token is available, the app falls back to the standard AWS SDK credential chain. The chain can read AWS credentials from ~/.aws/credentials and related profile settings from ~/.aws/config. On Windows, the corresponding default paths are %USERPROFILE%\.aws\credentials and %USERPROFILE%\.aws\config. The chain also supports SSO profiles. For SSO, it uses the profile settings in the AWS config file and the cached SSO session to obtain temporary role credentials. These credentials don’t need to be manually stored in the AWS credentials file. See OpenAI’s Bedrock authentication documentation and the AWS IAM Identity Center credential provider documentation.
Step 2: Set up ChatGPT desktop app configuration files
You must create two ChatGPT desktop app configuration files: config.toml and requirements.toml.
Important: the configuration files need to be set up before the application is launched. The following table shows the file locations.
| Operating system | User config.toml |
Admin requirements.toml |
| Windows | %USERPROFILE%\.codex\config.toml |
%ProgramData%\OpenAI\Codex\requirements.toml |
| Linux | ~/.codex/config.toml |
/etc/codex/requirements.toml |
| macOS | ~/.codex/config.toml |
/etc/codex/requirements.toml |
Start from the requirements.toml file. requirements.toml is an administrator-controlled rules file. It sets security limits that users can’t override, for example, restricting which permission levels, tools, or settings the ChatGPT desktop app is allowed to use.
Use the following baseline for the supported AWS GovCloud (US) Amazon Bedrock deployment. The [windows] section applies only to Windows, and sandbox_private_desktop must be supported by the approved runtime.
allowed_login_methods = ["api"]
allowed_sandbox_modes = ["read-only", "workspace-write"]
allowed_approvals_reviewers = ["user"]
allowed_approval_policies = [
{ granular = { sandbox_approval = false, rules = true,
mcp_elicitations = false, request_permissions = false,
skill_approval = true } },
]
allowed_web_search_modes = ["disabled", "cached"]
allow_browser_and_computer_use = false
allow_appshots = false
allow_remote_control = false
allow_login_shell = false
allow_managed_hooks_only = true
check_for_update_on_startup = false
mcp_servers = {}
[feedback]
enabled = false
[features]
network_proxy = true
in_app_chat = false
in_app_dictation = false
in_app_browser = false
browser_use = false
browser_use_external = false
browser_use_full_cdp_access = false
computer_use = false
in_app_updates = false
image_generation = false
memories = false
chronicle = false
external_agent_memory_import = false
guardian_approval = false
guardianv2 = false
guardian_ext = false
apps = false
enable_mcp_apps = false
plugins = false
remote_plugin = false
plugin_sharing = false
recommended_plugins = false
skill_mcp_dependency_install = false
skill_search = false
workspace_dependencies = false
hooks = false
standalone_web_search = false
[experimental_network]
enabled = true
managed_allowed_domains_only = true
domains = {}
unix_sockets = {}
allow_upstream_proxy = false
dangerously_allow_non_loopback_proxy = false
dangerously_allow_all_unix_sockets = false
allow_local_binding = false
[application.network]
enabled = true
[application.network.domains]
"bedrock-mantle.us-gov-west-1.api.aws" = "allow"
"api.openai.com" = "deny"
"chat.openai.com" = "deny"
"chatgpt.com" = "deny"
"ab.chatgpt.com" = "deny"
"platform.openai.com" = "deny"
"auth.openai.com" = "deny"
"gov.api.openai.com" = "deny"
"gov.chatgpt.com" = "deny"
"sdfedpreastus2.oaiusercontent.com" = "deny"
"o33249.ingest.us.sentry.io" = "deny"
"persistent.oaistatic.com" = "deny"
"oaisidekickupdates.blob.core.windows.net" = "deny"
[windows]
allowed_sandbox_implementations = ["elevated"]
sandbox_private_desktop = true
Next, configure the config.toml file. config.toml tells the ChatGPT desktop app how to operate, including which model provider to use (amazon-bedrock), which model to select, and settings such as permissions or context limits.
Replace the model ID and named profile (for example, codex-il5) with approved values.
model = "REPLACE_WITH_APPROVED_MODEL_ID"
model_provider = "amazon-bedrock"
forced_login_method = "api"
approval_policy = { granular = { sandbox_approval = false,
rules = true, mcp_elicitations = false,
request_permissions = false, skill_approval = true } }
approvals_reviewer = "user"
sandbox_mode = "workspace-write"
web_search = "cached"
allow_login_shell = false
check_for_update_on_startup = false
[model_providers.amazon-bedrock]
base_url = "https://bedrock-mantle.us-gov-west-1.api.aws/openai/v1"
wire_api = "responses"
requires_openai_auth = false
supports_websockets = false
supports_standalone_web_search = false
[model_providers.amazon-bedrock.aws]
region = "us-gov-west-1"
profile = "codex-il5"
[sandbox_workspace_write]
network_access = false
[features]
network_proxy = true
[analytics]
enabled = false
[feedback]
enabled = false
[otel]
exporter = "none"
trace_exporter = "none"
metrics_exporter = "none"
log_user_prompt = false
[memories]
generate_memories = false
use_memories = false
[skills.bundled]
enabled = false
[apps._default]
enabled = false
[windows]
sandbox = "elevated"
Step 3: Launch, initialize, and verify
Download the app from the ChatGPT site and install it. Leave the app closed after installation. If it opens automatically or if the app has been launched previously, fully exit ChatGPT and end any lingering ChatGPT or Codex processes.
Make sure requirements.toml and config.toml are in place before the first app launch.
Start the app to load the requirements.toml and config.toml settings. Make sure it shows amazon-bedrock as the model provider.
In the Codex CLI, you should see a /status tab that looks like this:
Figure 1: The Codex CLI /status tab confirming amazon-bedrock as the model provider
In the ChatGPT desktop app, you can also confirm amazon-bedrock as the model provider.
Figure 2: The ChatGPT desktop app settings showing amazon-bedrock as the model provider
Troubleshooting
The application prompts for an OpenAI account. Verify that requirements.toml and config.toml use the exact locations and file names shown in the preceding table, terminate all ChatGPT and Codex processes, and relaunch. The files must precede app launch.
AWS GovCloud (US) endpoint is reported as unsupported. Confirm the exact desktop or app-server release, endpoint, and model with OpenAI. Changing the URL alone does not establish support.
The wrong AWS identity is used. Inspect the effective credential source and named profile. Check whether an Amazon Bedrock API key takes precedence over the profile.
Capability restrictions are missing. Inspect the full effective requirements after restart. The API-only sign-in setting doesn’t apply the capability policy.
Rollback and cleanup
If a validation check fails, stop the rollout. Return the affected devices to the previously approved policy and provider settings, then restart the ChatGPT desktop app. Revoke any temporary AWS credentials or API keys, and confirm that those devices can no longer connect to Amazon Bedrock. Keep a record of the test and clearly document what failed before trying again.
Conclusion
The ChatGPT desktop app on Amazon Bedrock in AWS GovCloud (US) gives you a controlled way to use OpenAI frontier models and coding assistance. Inference stays in the AWS GovCloud (US) Regions. By validating the configuration, confirming the approved AWS identity and endpoint, and verifying security controls, you can confidently prepare the deployment for broader use. This approach supports innovation while aligning deployment decisions with each organization’s security, authorization, and data-handling requirements.
Ready to explore the ChatGPT desktop app with Codex on Amazon Bedrock in AWS GovCloud (US)? Start with a controlled deployment, validate your security controls, and work with your security team to prepare for broader adoption.
Related resources
- Bedrock AWS GovCloud (US) configuration – ChatGPT desktop app device, provider, network, verification, and troubleshooting guidance.
- Responses API on Amazon Bedrock – AWS Regions, endpoint behavior, authentication, and permissions for the Responses API.
- AWS GovCloud (US) compliance – Compliance programs and customer authorization considerations.
- OpenAI’s Bedrock authentication documentation – Amazon Bedrock API key and AWS SDK credential-chain authentication, including SSO.
- AWS IAM Identity Center credential provider documentation – SSO profile configuration and temporary AWS credentials.
About the authors
Virgil Ennes
Virgil is a Senior Partner Solutions Architect at AWS and a GenAI and AI/ML specialist. He helps partners and customers integrate OpenAI technologies with AWS services, transforming innovative ideas into scalable, real-world business solutions.
Sean Phuphanich
Sean is a Principal Technologist of Applied AI and segment lead for ISVs. Sean is focused on solving major challenges for industry with frontier AI and optimizing the pareto curve. Sean is also a development and cyber security SME, and program manager for AWS Zero Trust Accelerator for Government (ZTAG).
Original source
This story was published by AWS Machine Learning Blog and written by Virgil Ennes. SyncAI.news shows a preview; the complete article is on the publisher's site.
Read the full story on aws.amazon.com


