Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Default client configuration for Node.js

Focus mode
Default client configuration for Node.js - Amazon DynamoDB

When configuring the DAX JavaScript SDK client, you can customize various parameters to optimize performance, connection handling, and error resilience. The following table outlines the default configuration settings that control how your client interacts with the DAX cluster, including timeout values, retry mechanisms, credential management, and health monitoring options. For more information, see DynamoDBClient Operations.

DAX JS SDK client defaults
Parameter Type Description

region

optional

string

The AWS Region to use for the DAX client (example - 'us-east-1'). This is a required parameter if not provided through the environment variable.

endpoint

required

string

The endpoint of the Cluster to which the SDK connects.

Examples:

Non-encrypted – dax-cluster-name.region.amazonaws.com

Encrypted – daxs://my-cluster.l6fzcv.dax-clusters.us-east-1.amazonaws.com

requestTimeout

default 6000 ms

number

This defines the maximum time the client will wait for a response from DAX.

writeRetries

default 1

number

The number of retries to attempt for write requests that fail.

readRetries

default 1

number

The number of retries to attempt for read requests that fail.

maxRetries

default 1

number

The maximum number of retries to attempt on failed requests.

If readRetries/writeRetries are set, then the configuration set in readRetries and writeRetries take priority over maxRetries.

connectTimeout

default 10000 ms

number

The timeout (in milliseconds) for establishing a connection to any of the cluster nodes.

maxRetryDelay

default 7000 ms

number

When the DAX server indicates recover is needed by setting waitForRecoveryBeforeRetrying flag to true, the client will pause before retry attempts. During these recovery periods, the maxRetryDelay parameter determines the maximum waiting time between retries. This recovery-specific configuration only applies when the DAX server is in recovery mode. For all other scenarios, retry behavior follows one of two patterns: either an exponential delay based on the retry count (governed by writeRetries, readRetries, or maxRetries parameters), or an immediate retry depending on the exception type.

credentials

optional

AwsCredentialIdentity | AwsCredentialIdentityProvider

The AWS credentials to use for authenticating requests. This can be provided as an AwsCredentialIdentity or an AwsCredentialIdentityProvider. If not provided, the AWS SDK will automatically use the default credentials provider chain. Example: `{ accessKeyId: 'AKIA...', secretAccessKey: '...', sessionToken: '...' }` * @default Uses default AWS credentials provider chain.

healthCheckInterval

default 5000 ms

number

The interval (in milliseconds) between cluster health checks. A lower interval will check more frequently.

healthCheckTimeout

default 1000 ms

number

The timeout (in milliseconds) for the health check to complete.

skipHostnameVerification

default false

boolean

Skip hostname verification of TLS connections. This has no impact on un-encrypted clusters. The default is to perform hostname verification, setting this to True will skip verification. Be sure you understand the implication of turning it off, which is the inability to authenticate the cluster that you are connecting to.

unhealthyConsecutiveErrorCount

default 5

number

Sets the number of consecutive errors required to signal node unhealthy within health check interval.

clusterUpdateInterval

default 4000 ms

number

Returns the interval between polling of cluster members for membership changes.

clusterUpdateThreshold

default 125

number

Returns the threshold below which the cluster will not be polled for membership changes.

credentailProvider

optional | default null

AwsCredentialIdentityProvider

User Defined Provider for AWS credentials used to authenticate requests to DAX.

Pagination configuration for DaxDocument
Name Type Detail

client

DaxDocument

Instance of DaxDocument type.

pageSize

number

Determines the number of items per page.

startingToken

Optional

any

LastEvaluatedKey from previous response can be used for subsequent requests.

For usage of pagination, see TryDax.js.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.