Options for configuring DynamoDBFeatureStoreFactory or DynamoDBBigSegmentStoreFactory.

Hierarchy

  • LDDynamoDBOptions

Properties

cacheTTL?: number

The amount of time, in seconds, that recently read or updated items should remain in an in-memory cache. If it is zero, there will be no in-memory caching.

This parameter applies only to DynamoDBFeatureStore. It is ignored for DynamoDBBigSegmentStore. Caching for DynamoDBBigSegmentStore is configured separately, in the SDK's LDBigSegmentsOptions type, since it is independent of what database implementation is used.

If omitted, the default value is 15 seconds.

clientOptions?: DynamoDBClientConfig

Options to be passed to the DynamoDB client constructor, as defined by the AWS SDK.

Remarks

When these options do not include a requestHandler, the store adds its default handler configuration: a connection timeout and a request timeout. Without them, one hung request would block every later store write. Supply your own requestHandler to override them.

dynamoDBClient?: DynamoDBClient

Specifies an existing, already-configured DynamoDB client instance that the feature store should use rather than creating one of its own. If you specify an existing client, then the clientOptions property is ignored.

Remarks

The store bounds each request with a deadline on its total elapsed time, and that also applies to a supplied client. The deadline uses Node timers, which follow the monotonic clock, so system clock changes do not affect it. A request budget configured for more than 100 seconds is cut off at the deadline.

logger?: LDLogger

A logger to be used for warnings and errors generated by the feature store. If not specified, it will use the SDK's logging configuration.

prefix?: string

An optional namespace prefix for all keys stored in DynamoDB. Use this if you are sharing the same database table between multiple clients that are for different LaunchDarkly environments, to avoid key collisions.

Generated using TypeDoc