Skip to main content

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​

VariableDefaultDescription
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_CLIENTlegacyThe Claude integration: legacy, mantle, or converse. See Claude clients.

Each value can be overridden per upstream in extraData of the DIAL Core model.

General​

VariableDefaultDescription
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_LEVELINFOThe log level. Use DEBUG for development only.
CLAUDE_DEFAULT_MAX_TOKENS1536The default max_tokens for Claude. Prefer a per-model default in DIAL Core instead.
BOTOCORE_MAX_RETRY_ATTEMPTS0Retries of Bedrock API and Converse API requests on a retriable error.
ANTHROPIC_MAX_RETRY_ATTEMPTS0Retries of Anthropic requests on a retriable error.
REQUEST_TIMEOUT_SECONDS600The read and write timeout of requests to Bedrock, in seconds.
DIAL_API_VERSION2025-01-01-previewThe 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​

VariableDefaultDescription
WEB_CONCURRENCY1The number of server workers.
TIMEOUT_KEEP_ALIVE70How 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.

VariableApplies toDefaultDescription
ANTHROPIC_MAX_CONNECTIONSClaude through the Anthropic SDK1000The most concurrent requests.
ANTHROPIC_MAX_KEEPALIVE_CONNECTIONSClaude through the Anthropic SDK100The most idle connections kept in the pool.
ANTHROPIC_POOL_TIMEOUTClaude through the Anthropic SDK10How long a request waits for a free connection, in seconds. On timeout, the adapter answers 503.
BOTOCORE_CLIENT_MAX_POOL_CONNECTIONSBedrock API and Converse API1000The most connections kept in the pool.
THREAD_POOL_SIZEBedrock API and Converse API512The 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.modelId is the requested model ID. UserInfo.<path> is a field of DIAL Core's GET /v1/user/info response: roles (for example UserInfo.roles.0), project, or userClaims (for example UserInfo.userClaims.email).
  • Tags apply only with an assumed role (AWS_ASSUME_ROLE_ARN or aws_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.project tag, the session is named Project_<project> instead of BedrockAccessSession.
  • 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​