dynamodb-admin icon indicating copy to clipboard operation
dynamodb-admin copied to clipboard

Upgrade AWS SDK to v3

Open garrettheel opened this issue 4 years ago • 8 comments

Proof of concept for upgrading to v3 of the AWS SDK

garrettheel avatar Oct 26 '19 20:10 garrettheel

I will have a look when I have more time but maybe it would make sense to also support big numbers by using BigInt (would require changing requirements to at least Node 10 but it would probably make sense to go all-in).

rchl avatar Oct 31 '19 21:10 rchl

Hey all! Any update on this or has it been abandoned?

emadow avatar Feb 28 '20 22:02 emadow

The @aws-sdk/client-dynamodb-v2-node package is at version 0.1.0-preview-2 and hasn't been updated in over a year. Given that, I'm don't feel confident switching to it.

rchl avatar Feb 29 '20 10:02 rchl

@rchl it seems like development of this package may have moved over to https://github.com/aws/aws-sdk-js-v3 / https://www.npmjs.com/package/@aws-sdk/client-dynamodb. It's definitely confusing and the public documentation on the AWS appears out of date.

I'm not sure that using BigInt would help much, since the issue is in the underlying SDK and the overflow would already have happened before dynamodb-admin can use a BigInt. Let me know if I'm missing something obvious here.

garrettheel avatar Apr 30 '20 14:04 garrettheel

Not sure 100% but numbers in dynamodb are represented as strings, I believe (based on that). So as long as SDK supports BigInt, it should work.

rchl avatar Apr 30 '20 14:04 rchl

I would be fine with upgrading to v3-beta if there wouldn't be any compatibility issues with existing tables.

I would think there shouldn't be as SDK should at most break compatibility between User and SDK, not between SDK and DynamoDB but I can't say for sure and don't really have time to research that.

rchl avatar Apr 30 '20 14:04 rchl

What do you see as a "compatibility issue" in this case? The DynamoDB API remains the same, so this basically just changes the SDK interface (which is good in this case, since it allows us to fix the integer overflow).

I can check in on the status of the v3 SDK with AWS and update this PR to make use of the latest, but if you'd prefer not to change then I'll fork and do that work elsewhere instead. Up to you.

garrettheel avatar Apr 30 '20 14:04 garrettheel

No, I meant I'm fine with upgrading to v3 if it doesn't break compatibility with dynamodb. I expected it doesn't but wanted to be sure.

rchl avatar May 01 '20 08:05 rchl

Thanks for the effort on this PR @garrettheel

I'm going to try running PR 409 from @vikasperi as it has the latest.

@rchl & @vikasperi, I'll post back with my findings.

particledream avatar Sep 11 '23 15:09 particledream