
Research
Security News
The Landscape of Malicious Open Source Packages: 2025 Mid‑Year Threat Report
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
github.com/launchdarkly/go-server-sdk-dynamodb/v3
This library provides a DynamoDB-backed persistence mechanism (data store) for the LaunchDarkly Go SDK, replacing the default in-memory data store.
This version of the library requires at least version 6.0.0 of the LaunchDarkly Go SDK; for versions of the library to use with earlier SDK versions, see the changelog.
This version of the library uses the v2 AWS Go SDK.
The minimum Go version is 1.18.
For more information, see also: Using DynamoDB as a persistent feature store.
This assumes that you have already installed the LaunchDarkly Go SDK.
import (
ld "github.com/launchdarkly/go-server-sdk/v6"
"github.com/launchdarkly/go-server-sdk/v6/ldcomponents"
lddynamodb "github.com/launchdarkly/go-server-sdk-dynamodb/v3"
)
PersistentDataStore
. You may specify any custom DynamoDB options using the methods of DynamoDBDataStoreBuilder
. For instance: var config ld.Config{}
config.DataStore = ldcomponents.PersistentDataStore(
lddymamodb.DataStore("my-table-name").
ClientOptions(dynamodb.Options{Region: "us-west-1"}),
)
By default, the DynamoDB client will try to get your AWS credentials and region name from environment variables and/or local configuration files, as described in the AWS SDK documentation.
The LaunchDarkly SDK has a standard caching mechanism for any persistent data store, to reduce database traffic. This is configured through the SDK's PersistentDataStoreBuilder
class as described the SDK documentation. For instance, to specify a cache TTL of 5 minutes:
var config ld.Config{}
config.DataStore = ldcomponents.PersistentDataStore(
lddynamodb.DataStore("my-table-name"),
).CacheMinutes(5)
DynamoDB has a 400KB limit on the size of any data item. For the LaunchDarkly SDK, a data item consists of the JSON representation of an individual feature flag or segment configuration, plus a few smaller attributes. You can see the format and size of these representations by querying https://sdk.launchdarkly.com/flags/latest-all
and setting the Authorization
header to your SDK key.
Most flags and segments won't be nearly as big as 400KB, but they could be if for instance you have a long list of user keys for individual user targeting. If the flag or segment representation is too large, it cannot be stored in DynamoDB. To avoid disrupting storage and evaluation of other unrelated feature flags, the SDK will simply skip storing that individual flag or segment, and will log a message (at ERROR level) describing the problem. For example:
The item "my-flag-key" in "features" was too large to store in DynamoDB and was dropped
If caching is enabled in your configuration, the flag or segment may still be available in the SDK from the in-memory cache, but do not rely on this. If you see this message, consider redesigning your flag/segment configurations, or else do not use DynamoDB for the environment that contains this data item.
This limitation does not apply to target lists in Big Segments.
A future version of the LaunchDarkly DynamoDB integration may use different strategies to work around this limitation, such as compressing the data or dividing it into multiple items. However, this integration is required to be interoperable with the DynamoDB integrations used by all the other LaunchDarkly SDKs and by the Relay Proxy, so any such change will only be made as part of a larger cross-platform release.
LaunchDarkly is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. Get started using LaunchDarkly today!
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.