Configuration
The DIAL Bedrock Adapter is configured with environment variables on its container, while each model is configured in DIAL Core. This reference lists every variable: AWS credentials, Claude defaults, retries and timeouts, AWS session tags, and resource limits. It is for platform engineers who run the adapter; per-upstream overrides are in Accounts, regions, and load balancing.
AWS credentials and region
| Variable | Default | Description |
|---|---|---|
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY | — | AWS credentials with access to Bedrock. |
AWS_SESSION_TOKEN | — | The session token of temporary credentials. |
AWS_DEFAULT_REGION | — | The AWS region, for example us-east-1. |
AWS_ASSUME_ROLE_ARN | — | A role to assume, for example arn:aws:iam::123456789012:role/RoleName. |
AWS_SESSION_TAGS | — | A JSON map of AWS STS session tags to pass when assuming a role. See Session tags. |
AWS_CLAUDE_DEFAULT_CLIENT | legacy | The Claude integration: legacy, mantle, or converse. See Claude clients. |
Each value can be overridden per upstream in extraData of the DIAL Core model.
General
| Variable | Default | Description |
|---|---|---|
DIAL_URL | — | The URL of DIAL Core. When set, images generated by Stability AI models are uploaded to DIAL file storage and returned as links; otherwise they are returned as base64. The translator also calls this URL, and is unavailable without it. |
LOG_LEVEL | INFO | The log level. Use DEBUG for development only. |
CLAUDE_DEFAULT_MAX_TOKENS | 1536 | The default max_tokens for Claude. Prefer a per-model default in DIAL Core instead. |
BOTOCORE_MAX_RETRY_ATTEMPTS | 0 | Retries of Bedrock API and Converse API requests on a retriable error. |
ANTHROPIC_MAX_RETRY_ATTEMPTS | 0 | Retries of Anthropic requests on a retriable error. |
REQUEST_TIMEOUT_SECONDS | 600 | The read and write timeout of requests to Bedrock, in seconds. |
DIAL_API_VERSION | 2025-01-01-preview | The api-version the translator sends to DIAL Core on its /openaiChatCompletions/legacy path. |
COMPATIBILITY_MAPPING | {} | Deprecated. A JSON map from unsupported to supported model IDs. Use compatible_model_id in DIAL Core instead; see Compatibility mode. |
Server
| Variable | Default | Description |
|---|---|---|
WEB_CONCURRENCY | 1 | The number of server workers. |
TIMEOUT_KEEP_ALIVE | 70 | How long an idle keep-alive connection stays open, in seconds. Keep it 10 seconds above DIAL Core's client.keepAliveTimeout, 60 by default, so Core always closes first; a shorter value makes requests fail with Connection was closed. |
Resource limits
These variables expose implementation details and can change between releases. Change them only when you know you need to.
| Variable | Applies to | Default | Description |
|---|---|---|---|
ANTHROPIC_MAX_CONNECTIONS | Claude through the Anthropic SDK | 1000 | The most concurrent requests. |
ANTHROPIC_MAX_KEEPALIVE_CONNECTIONS | Claude through the Anthropic SDK | 100 | The most idle connections kept in the pool. |
ANTHROPIC_POOL_TIMEOUT | Claude through the Anthropic SDK | 10 | How long a request waits for a free connection, in seconds. On timeout, the adapter answers 503. |
BOTOCORE_CLIENT_MAX_POOL_CONNECTIONS | Bedrock API and Converse API | 1000 | The most connections kept in the pool. |
THREAD_POOL_SIZE | Bedrock API and Converse API | 512 | The size of the thread pool that runs blocking AWS SDK calls. |
Session tags
AWS_SESSION_TAGS passes AWS STS session tags on each AssumeRole call. Name the tags as your IAM policies expect them:
AWS_SESSION_TAGS={"application":"Bedrock.modelId","project":"UserInfo.project","employee":"UserInfo.userClaims.email"}
- Each key is the tag name; each value names where the value comes from.
Bedrock.modelIdis the requested model ID.UserInfo.<path>is a field of DIAL Core'sGET /v1/user/inforesponse:roles(for exampleUserInfo.roles.0),project, oruserClaims(for exampleUserInfo.userClaims.email). - Tags apply only with an assumed role (
AWS_ASSUME_ROLE_ARNoraws_assume_role_arn), to every Bedrock client the adapter creates, including the Anthropic passthrough. They are ignored for static credentials and Anthropic API key upstreams. - With a
UserInfo.projecttag, the session is namedProject_<project>instead ofBedrockAccessSession. - An unknown value source, or a tag that cannot be read, is skipped with a warning and never fails the request. Values are fitted to the AWS limits.
Logging
Logging comes from the DIAL SDK: the format, structured JSON output, trace correlation, and OpenTelemetry log export are set by the DIAL_SDK_* variables in the DIAL SDK logging documentation. To log the Anthropic SDK, set ANTHROPIC_LOG=debug.
Example
adapter-dial-bedrock:
image: epam/ai-dial-adapter-bedrock:0.45.1
environment:
DIAL_URL: http://core:8080
AWS_DEFAULT_REGION: us-east-1
AWS_ASSUME_ROLE_ARN: arn:aws:iam::123456789012:role/DialBedrockAccess
AWS_CLAUDE_DEFAULT_CLIENT: mantle
AWS_SESSION_TAGS: '{"application":"Bedrock.modelId","project":"UserInfo.project"}'
BOTOCORE_MAX_RETRY_ATTEMPTS: "2"
Further reading
- DIAL Bedrock Adapter capabilities — per-upstream credentials and the Claude clients
- Bedrock model deployment — prepare AWS for DIAL
- DIAL Bedrock Adapter supported models — the model IDs to use