Configure the Connection
The administrator configures AWS access and the available models. Users then choose a model in the OpenHands UI when starting a conversation. This shared view shows configuration and model selection, rather than individual network hops. Dashed arrows show administrator configuration, solid arrows show model selection, and the thick arrow shows inference requests. Replicated and Helm use the bundled gateway; the Compose procedure below calls Bedrock directly. The installation tabs explain where AWS credentials are supplied in each case. If something fails, check the available model (ID, and profile Base URL where applicable), the provider configuration, and Bedrock permissions or connectivity. For Replicated and Helm, also check connectivity to the gateway. The installation tabs cover the configuration details.- Replicated
- Helm
- Docker Compose
- Open the Admin Console LLM configuration.
-
Select
AWS Bedrockand enter the AWS Region. -
Under
AWS Authentication Method, choose one of the Admin Console options:Access Key + Secret: enter theAWS Access Key IDand matchingAWS Secret Access Keyin their required fields.EC2 Instance Profile: attach an IAM role to the EC2 instance. In a containerized installation, set the instance metadata service (IMDS) response hop limit to at least 2 so the LiteLLM pod can reach it.
bedrock:InvokeModelandbedrock:InvokeModelWithResponseStreamfor every model you add. -
In
Bedrock Model IDs, enter one Bedrock model ID or inference profile ID per line. Enter the IDs as AWS provides them, without thebedrock/prefix. For example:The Admin Console creates a separate bundled-gateway model for each line. The first line becomes the installation default. Use IDs available to your account and selected Region; check each inference profile withaws bedrock get-inference-profilebefore adding it. - Save the configuration and deploy the updated version.
us. prefix in these examples. Your IAM policy must permit the profile and
its destination models. A standard model ID is Region-specific. The
Allow users to configure their own LLM providers (BYOK) checkbox controls
whether users can add personal providers; it is not required for these
administrator-managed Bedrock models.In the Replicated static-key configuration, the installer also passes the AWS
access key and secret into sandbox environments. With an EC2 instance profile,
sandboxes may also reach IMDS unless your network controls prevent that access;
a response hop limit of 2 does not isolate credentials to the gateway.
Scope the IAM identity for this deployment behavior rather than assuming that
only the LiteLLM pod can use it.
Select a Gateway Model in OpenHands
For Docker Compose, use the direct profile in its tab above. The following gateway aliases and Kubernetes service URL apply to Replicated and Helm. For a Replicated installation, select the Bedrock model configured in the Admin Console. For a Helm installation, create a profile inSettings → LLM
for each gateway alias you want users to select. For the first Helm example
above, use:
Use your installation’s actual LiteLLM Service name and namespace. The profile
points to the internal gateway, not to a Bedrock endpoint.
For the second Helm route, create another profile with Model
openhands/bedrock-sonnet-4-5 and the same Base URL.
Start Using the Model
- Select the Bedrock profile and start a new conversation.
- Ask the agent to run
pwd. - Confirm it starts a sandbox, runs the command, and replies with the output.
Troubleshooting
Compose agent cannot find AWS credentials
Compose agent cannot find AWS credentials
Set credentials on both app and worker and in each service’s
OH_AGENT_SERVER_ENV JSON. Preserve existing entries, recreate the two services,
and launch a fresh sandbox. A host AWS CLI login or a successful application
request does not establish that agent containers have credentials.Direct Bedrock requests return 404 or reach another provider
Direct Bedrock requests return 404 or reach another provider
Edit the saved profile, clear Base URL, and save it again. Leave the profile API
Key empty and start a fresh conversation. Direct Bedrock uses AWS authentication
and endpoint selection rather than an Anthropic or OpenAI-compatible base URL.
Bedrock AccessDeniedException
Bedrock AccessDeniedException
For Docker Compose, check the IAM permissions of the supplied credential pair.
For Helm, check the IAM role annotation on the LiteLLM ServiceAccount, the role trust
policy’s exact namespace and ServiceAccount subject, and the role’s model
invocation policy. For a cross-Region inference profile, include its source
profile ARN and all destination model ARNs; check organization service control
policies for denied Regions.
Model or inference profile not found
Model or inference profile not found
Check the exact model or profile ID and configured Region (
AWS_REGION_NAME
for direct Compose, aws_region_name for the gateway). A model available in
one Region may require an inference profile in another.The profile cannot reach the gateway
The profile cannot reach the gateway
Check the internal LiteLLM Service DNS name, namespace, and profile base URL.
Confirm the LiteLLM Deployment is ready and its logs show the Bedrock route.
The model answers a short prompt but the agent cannot work
The model answers a short prompt but the agent cannot work
Confirm the Bedrock model supports tool use and that its account quotas allow
larger agent prompts. Test a full conversation with a sandbox command, not
only a direct model completion.

