Amazon Bedrock
Operator guide for turning on the Amazon Bedrock provider. Unlike every other LLM provider in AXL, Bedrock has no AXL API key: it authenticates through the AWS default credential chain, and the AWS account itself must grant model access and IAM permissions before a single request will succeed. This guide covers that AWS-side setup end to end.
For the axl-side knobs see
(canonical BEDROCK_* reference); for how the provider is wired see the Providers section of
; for the design rationale see
docs/prds/AWS_BEDROCK_PROVIDER.md.
At a glance
You need four things in place before AXL can talk to Bedrock:
- Credentials discoverable by the AWS default chain.
- Model access granted for each model you intend to call (Bedrock blocks all models by default).
- IAM permissions for the Converse actions.
- A region where your access is granted.
Then set BEDROCK_ENABLED=true and AXL constructs the provider.
Credentials
AXL loads credentials with the AWS default credential provider chain (aws-config), so it
picks up whatever the AWS CLI/SDKs already use. It never sees or stores a secret. Pick whichever
fits your environment:
| Method | How | Best for |
|---|---|---|
| Shared profile | aws configure writes ~/.aws/credentials; run AXL with AWS_PROFILE=<name> (or default) | a laptop / dev box |
| Environment variables | export AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY (+ AWS_SESSION_TOKEN if temporary) | CI, containers |
| AWS SSO / IAM Identity Center | aws sso login --profile <name>; run AXL with AWS_PROFILE=<name> | org-managed accounts |
| IAM role | instance profile (EC2), task role (ECS), or IRSA (EKS) - resolved automatically | production on AWS |
Role assumption (role_arn + source_profile, web identity, cross-account) is handled by the
chain itself; there is deliberately no AXL knob for it.
Enable model access
Bedrock denies every foundation model until you request access. In the AWS console:
Bedrock -> Model access -> Modify model access, then enable the models you want. Anthropic Claude access is usually granted quickly.
The default model AXL ships is:
us.anthropic.claude-sonnet-4-5-20250929-v1:0so at minimum enable Claude Sonnet 4.5. All curated Bedrock ids use the us. cross-region
inference-profile prefix (see section 4), so
grant access in the US regions the profile spans.
Missing model access surfaces as an AWS AccessDeniedException naming the model, not a
credential error - so if sts get-caller-identity works but a call is denied, check here first.
IAM permissions
The Converse and ConverseStream operations are authorized by two actions:
bedrock:InvokeModel # Converse (non-streaming)
bedrock:InvokeModelWithResponseStream # ConverseStream (streaming)For a first smoke test, the AWS-managed AmazonBedrockFullAccess policy covers everything.
For a scoped policy, this is the minimum - note that an inference-profile call needs permission on
both the profile ARN and the underlying foundation-model ARNs:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "BedrockConverse",
"Effect": "Allow",
"Action": [
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream"
],
"Resource": [
"arn:aws:bedrock:*::foundation-model/*",
"arn:aws:bedrock:*:<ACCOUNT_ID>:inference-profile/*"
]
}
]
}Tighten Resource to specific model/profile ARNs once you know which models you serve. (The
foundation-model ARN has no account id - those models are AWS-owned; the inference-profile ARN
carries your account id.)
Region and the us. inference-profile prefix
Set the region to one where your model access is granted:
BEDROCK_REGION=us-east-1(orus-west-2), or- rely on the chain's region (
AWS_REGION/ the profile's region) and leaveBEDROCK_REGIONunset.
If no region resolves anywhere, the call fails - always have one set.
The us. prefix on the curated ids (e.g. us.anthropic.claude-sonnet-4-5-...) marks a
cross-region inference profile: AWS routes the request across US regions for capacity. This
is why the ids differ from the raw Anthropic-on-Bedrock model ids and why you call from a US
region. To use a plain (non-profile) model id or another geography, set BEDROCK_MODEL to that
id and grant access accordingly.
Turn it on in AXL
Minimum configuration (full reference in ):
BEDROCK_ENABLED=true
BEDROCK_REGION=us-east-1
# BEDROCK_MODEL defaults to us.anthropic.claude-sonnet-4-5-20250929-v1:0
# LLM_PROVIDER=bedrock # only if Bedrock should supply the default modelAt init, AXL logs the resolved region, credential source, and default model id (no secret is logged), so a region/profile/model mismatch is self-diagnosable from the startup line.
Verify
Confirm the AWS side independently of AXL first - this isolates any problem:
# 1. Do credentials resolve?
aws sts get-caller-identity
# 2. Is model access granted in this region?
aws bedrock list-foundation-models --region us-east-1 --by-provider anthropic
# 3. End-to-end smoke, bypassing axl entirely:
aws bedrock-runtime converse \
--region us-east-1 \
--model-id us.anthropic.claude-sonnet-4-5-20250929-v1:0 \
--messages '[{"role":"user","content":[{"text":"say hi in 3 words"}]}]'If step 3 returns text, AXL will work - the provider is a thin wrapper over exactly that call.
Then boot the server with BEDROCK_ENABLED=true and exercise it (the tester-bedrock agent in
axl-config covers streaming, reasoning replay, and images).
Cost note
For plumbing checks, use a cheap model to keep it near-free: Claude 3.5 Haiku
(us.anthropic.claude-3-5-haiku-20241022-v1:0) or Amazon Nova Micro
(us.amazon.nova-micro-v1:0). The reasoning path (manual budget_tokens, stop_sequences
under thinking) needs a reasoning-capable Claude - Sonnet 4.5, Opus 4.1, or Claude 3.7 Sonnet -
so budget a few cents for those specific runs.
Troubleshooting
| Symptom | Likely cause |
|---|---|
Unable to load credentials / sts get-caller-identity fails | No credentials on the chain - do section 1 |
AccessDeniedException naming a model | Model access not granted - do section 2 |
AccessDeniedException on the action | IAM policy missing the Converse actions - do section 3 |
ValidationException about the region / model not found | Model not available in this region, or wrong id - check section 4 |
ValidationException naming supported models on a forced tool choice | Only Claude 3 / Nova accept a forced tool_choice; see the Known Issues in LLM_SYSTEM.md |
Startup: BEDROCK_ENABLED is true but the AWS SDK config was not loaded | Internal - the SDK config failed to load; check the region/credential startup log line |
See also
- - canonical
BEDROCK_*env-var reference. - - provider architecture, extended reasoning, and Bedrock Known Issues.
docs/prds/AWS_BEDROCK_PROVIDER.md- design record and rationale.
Next
- Choose a model - selecting a Bedrock model per agent.
- LLM failover - falling back across providers during an outage.
- - registry and provider behavior.