launchdarkly / node-server-sdk-dynamodb Goto Github PK
View Code? Open in Web Editor NEWDynamoDB integration for the LaunchDarkly SDK for Server-side Node.js
License: Other
DynamoDB integration for the LaunchDarkly SDK for Server-side Node.js
License: Other
Is it possible to automatically ignore documents which are greater than 400KB in size?
This would not break synchronization process.
I can create a PR if you will accept it
Hey! I am trying to adopt LD in AWS Serverless and trying to use DynamoDBFeatureStore
and found a little issue there.
If there is any error with DymamoDB (like lack of permissions or not such table) I receive crash from LD CLient with cannot read property error from undefined
message.
After some investigation I found out that:
DynamoDBFeatureStore(...)(config)
) is LDOptionsMy assumption that logger should not be required in DynamoDBFeatureStore
(it might be default to something like console
perhaps).
I might be wrong as well, and it would be nice if someone explains this behavior to me)
Thanks for looking into it :)
aws-sdk has gone into maintenance mode as of 2023 and will not be receiving new updates. We are looking to migrate all of our existing uses into @AWS-SDK v3 clients which helps reduce our bundle size while running on Node20 lambdas as the sdk v2 is no longer provided by default it now has to be installed in each of our packages and increases our bundles.
I tried to update our launchdarkly package wrapper and noticed when trying to pass sdk v3 DocumentClient into launchdarkly-node-server-sdk-dynamodb it won't accept it because it's only accepting the type from sdk v2
dynamoDBClient?: DynamoDB.DocumentClient;
which is defined here: https://github.com/launchdarkly/node-server-sdk-dynamodb/blob/main/index.d.ts#L55
Ideally we would be able to provide appropriate classes for aws-sdk v3 instead of only using v2.
We are using this package in a lambda (as might be a pretty common use case for using DynamoDB as a flag store).
When this package is included it adds nearly 100MB to the lambda bundle.
Half of that is because it ships the AWS SDK as a required dep, which maybe be moved to a peerDep, unless you think the specific version you are using is critical to stability.
The other half is becuase typedoc is also shipped as a required dep. Seems like that could be moved to a devDep since I'm assuming it is used to generate your documentation, and not part of the production executed library.
We had one of our lambdas tip over the size limit when we included this package.
AWS recently announced the deprecation of aws-sdk
v2. Do you have a timeframe on migrating to the v3 SDK?
Deprecation info: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/#Version_2_x_Support
The current TypeScript definitions throw type errors when the package is imported.
When imported as such:
import DynamoDBFeatureStore from 'launchdarkly-node-server-sdk-dynamodb'
The following type error is emitted from the compiler:
Cannot invoke an expression whose type lacks a call signature. Type 'typeof import("launchdarkly-node-server-sdk-dynamodb")' has no compatible call signatures.
This is because the default import has not been properly tagged, and so typescript thinks that DynamoDBFeatureStore is a named import and wants you to import like so:
import { DynamoDBFeatureStore } from 'launchdarkly-node-server-sdk-dynamodb'
But then at run time, this throws an error because that named import does not actually exist.
Hi LaunchDarkly team,
Our team is so keen to know which DynamoDB permissions are required in our infrastructure in order to benefit from feature store
and big segments
in Node SDK. Would you be able to elaborate on this or steer me to the right documents or more info, please?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.