Developer Preview — This documentation covers the AWS SDK for Python, which is in Developer Preview and intended for evaluation and testing only. Do not use it for production workloads. For production applications, use the AWS SDK for Python (Boto3). To understand the differences between the two SDKs, see Choosing the right AWS SDK for Python.
Configuration variables
This page lists all configuration variables supported by the AWS SDK for Python, including their default values and usage examples where applicable.
aws_credentials_identity_resolver
An IdentityResolver that resolves AWS credentials for request
authentication. Set this field only to use a specific resolver instead of the
default credential resolver chain. For more information, see
Credential providers.
| Default | None (the client uses the default credential resolver chain) |
| Valid values | IdentityResolver[AWSCredentialsIdentity, AWSIdentityProperties] |
To provide static credentials directly, see Configure static credentials.
endpoint_uri
A custom endpoint URL to use instead of the standard AWS regional endpoint.
| Env var | AWS_ENDPOINT_URL (global),
AWS_ENDPOINT_URL_<SERVICE_ID> (service-specific) |
| Profile key | endpoint_url |
| Default | None (uses standard regional endpoint) |
Service-specific configs resolve this with extended precedence. See Service-specific endpoint resolution.
# Environment variable — global (applies to all services) export AWS_ENDPOINT_URL=http://localhost:4566 # Environment variable — service-specific export AWS_ENDPOINT_URL_BEDROCK_RUNTIME=http://localhost:5000
# Config file [default] endpoint_url = http://localhost:4566
interceptors
A list of interceptor hooks that are called at various points during request execution. Interceptors can inspect or modify requests and responses.
| Default | [] (empty list) |
max_attempts
An integer representing the maximum number of attempts made for a
single request, including the initial attempt. For example, setting this value to 5
results in a request being retried up to 4 times. If not provided, the number of
retries defaults to whatever is modeled, which is typically 3 in the
standard retry mode.
| Env var | AWS_MAX_ATTEMPTS |
| Profile key | max_attempts |
| Default | None (the retry strategy uses its own default, typically 3 for standard mode) |
| Valid values | Positive integer (>= 1) |
# Environment variable export AWS_MAX_ATTEMPTS=5
# Config file [default] max_attempts = 5
region
The AWS Region to send requests to.
| Env vars | AWS_REGION, AWS_DEFAULT_REGION |
| Profile key | region |
| Default | None |
| Valid values | AWS Region identifiers like us-east-1,
eu-west-1, ap-southeast-1 |
# Environment variable export AWS_REGION=us-west-2
# Config file [default] region = us-west-2
# Explicit override config = await AsyncBedrockRuntimeConfig.resolve(region="us-west-2")
retry_mode
A string that represents the type of retries the SDK performs.
| Env var | AWS_RETRY_MODE |
| Profile key | retry_mode |
| Default | "standard" |
| Valid values | "standard". Values "legacy" and
"adaptive" from environment variables or config files are
accepted but mapped to "standard" with a warning. |
-
standard: a standardized set of retry rules across the AWS SDKs. This includes a standard set of errors that are retried and support for retry quotas, which limit the number of unsuccessful retries the SDK can make. This mode will default the maximum number of attempts to 3 unless amax_attemptsis explicitly provided. -
legacy: not supported in this SDK. If set, it maps to"standard"with a warning. -
adaptive: not supported at the moment. If set, it maps to"standard"with a warning.
# Environment variable export AWS_RETRY_MODE=standard
# Config file [default] retry_mode = standard
retry_strategy
An explicit retry strategy instance that bypasses retry_mode and
max_attempts entirely. Use this when you need full control over retry
behavior.
| Default | None (uses retry_mode/max_attempts to
construct a strategy) |
sdk_ua_app_id
An optional application-specific identifier that can be set. When set, it is appended to the SDK's User-Agent header, allowing you to identify your application in AWS service logs.
| Env var | AWS_SDK_UA_APP_ID |
| Profile key | sdk_ua_app_id |
| Default | None |
| Valid values | Any string |
# Environment variable export AWS_SDK_UA_APP_ID=my-web-app
# Config file [default] sdk_ua_app_id = my-web-app
transport
The HTTP client that the SDK uses to send requests. For details, including the
optional AWSCRTHTTPClient and custom HTTP clients, see the
HTTP configuration page.
| Default | AIOHTTPClient |
user_agent_extra
An additional string appended to the User-Agent header.
| Default | None |