Settings reference

Here is a complete list of settings which control default PynamoDB behavior.


Default: 15

The time in seconds till a ConnectTimeoutError is thrown when attempting to make a connection.


Default: 30

The time in seconds till a ReadTimeoutError is thrown when attempting to read from a connection.


Default: 3

The number of times to retry certain failed DynamoDB API calls. The most common cases eligible for retries include ProvisionedThroughputExceededException and 5xx errors.


Default: 25

The base number of milliseconds used for exponential backoff and jitter on retries.


Default: "us-east-1"

The default AWS region to connect to.


Default: 10

The maximum number of connections to keep in a connection pool.


Default: None

A dictionary of headers that should be added to every request. This is only useful when interfacing with DynamoDB through a proxy, where headers are stripped by the proxy before forwarding along. Failure to strip these headers before sending to AWS will result in an InvalidSignatureException due to request signing.

Overriding settings

Default settings may be overridden by providing a Python module which exports the desired new values. Set the PYNAMODB_CONFIG environment variable to an absolute path to this module or write it to /etc/pynamodb/ to have it automatically discovered.