Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to aws-sdk-js-v3 document client #174

Closed

Conversation

deniszatsepin
Copy link
Contributor

@deniszatsepin deniszatsepin commented Jun 3, 2021

Migrating from aws-sdk-js-v2 to aws-sdk-js-v3. (#155)
It uses DynamoDB Document Client v3.

@deniszatsepin deniszatsepin marked this pull request as draft June 3, 2021 16:09
@deniszatsepin deniszatsepin changed the title WIP | chore: use aws-sdk-js-v3 document client Migrate to aws-sdk-js-v3 document client Jun 7, 2021
@deniszatsepin deniszatsepin marked this pull request as ready for review June 20, 2021 06:58
Copy link

@revmischa revmischa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 🙏🏻 Thank you so much for doing this! I hope this gets released soon!

@kunalshah
Copy link

Will this be merged anytime soon?

@ThomasAribart ThomasAribart added this to In progress in features via automation Oct 22, 2021
@ThomasAribart ThomasAribart moved this from In progress to To do in features Oct 22, 2021
@ThomasAribart ThomasAribart moved this from To do to In progress in features Oct 22, 2021
@johnbiiibs
Copy link

It's been months since the PR's been created. I don't think it's getting merged anytime soon. :(

@BabyDino
Copy link

Waiting for this one as well..

@pupeno
Copy link

pupeno commented Feb 13, 2022

Is there any help needed with this work?

@glcheetham
Copy link
Contributor

Let's get this one merged v3 drastically reduces bundle size for serverless apps on lambda 🙌

@ptejada
Copy link

ptejada commented Apr 9, 2022

@glcheetham technically you don't need to bundle v2 in your code since it is included in lambda function environment by default 🤷‍♂️

@darbio
Copy link
Contributor

darbio commented Apr 9, 2022

@glcheetham technically you don't need to bundle v2 in your code since it is included in lambda function environment by default 🤷‍♂️

True, but worth knowing that it's an 'old' (6 months since release at time of writing - v2.1001.0) version, so make sure you peg your code to the same version to avoid any unexpected issues.

@jeremydaly
Copy link
Owner

This merge has been on hold because of the work on v0.4. This is now a high priority item, but will need a major refactor. Working with other collaborators to get this compatible with v0.4.x.

@6ewis
Copy link

6ewis commented Oct 10, 2022

@jeremydaly when is the timeline to get this bad boy in? Do you foresee it being compatible with the current dynamo tool box API or will it introduce breaking changes.

Please note that DAX is not supported by aws s3 - so ideally dynamo toolbox should baked in the ability to switch easily between v2 and v3

@NimmLor
Copy link
Contributor

NimmLor commented Nov 18, 2022

Lambdas Node.js 18 runtime ships with sdk v3, would be nice if this would be merged soon

https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

@naorpeled
Copy link
Collaborator

Lambdas Node.js 18 runtime ships with sdk v3, would be nice if this would be merged soon

https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

At the moment I'm focusing on getting all the features/bug fixes in the issues section done, mostly because v3 is not backwards compatible, as far as I know.

Let me know if I'm wrong, would love to add support for v3

@ptejada
Copy link

ptejada commented Nov 18, 2022

V3 has some backwards compatibility interface but is not recommended to use it because it does not take advantage of the modularity of the new API

@shishkin
Copy link

dynamodb-onetable does support both V2 and V3 via a small abstraction layer. Maybe this idea could be useful here as well.

@revgum
Copy link

revgum commented Nov 20, 2022

@shishkin Thanks for calling this out!

Anyone else looking for a good DynamoDB library with Deno, I can verify that dynamodb-onetable is working great with Deno 1.28 by way of these three imports and following the dynamodb-onetable documentation for setting up the connection, table, model, etc.

... in import_map.json
    "@aws-sdk/client-dynamodb": "https://esm.sh/@aws-sdk/client-dynamodb@3.214.0",
    "dynamodb-onetable": "https://esm.sh/dynamodb-onetable@2.5.1",
    "dynamodb-onetable/Dynamo": "https://esm.sh/dynamodb-onetable@2.5.1/Dynamo"
...

Looks like a great abstraction, hopefully dynamodb-toolbox will benefit from it too!

@naorpeled
Copy link
Collaborator

dynamodb-onetable does support both V2 and V3 via a small abstraction layer. Maybe this idea could be useful here as well.

Great idea :)
If anyone wants to open a PR for this let me know.
If not, I'll try to implement it soon but a bit busy in the next few days 😢

@shishkin Thanks for calling this out!

Anyone else looking for a good DynamoDB library with Deno, I can verify that dynamodb-onetable is working great with Deno 1.28 by way of these three imports and following the dynamodb-onetable documentation for setting up the connection, table, model, etc.

... in import_map.json
    "@aws-sdk/client-dynamodb": "https://esm.sh/@aws-sdk/client-dynamodb@3.214.0",
    "dynamodb-onetable": "https://esm.sh/dynamodb-onetable@2.5.1",
    "dynamodb-onetable/Dynamo": "https://esm.sh/dynamodb-onetable@2.5.1/Dynamo"
...

Looks like a great abstraction, hopefully dynamodb-toolbox will benefit from it too!

Adding support for Deno is a great idea and should be fairly easy to implement afaik, will add that as a card on our milestones board.

@alexedwardjones
Copy link

Really keen to finally see this PR get over the line. Is there anything you need help with?

@naorpeled
Copy link
Collaborator

naorpeled commented Dec 20, 2022

Really keen to finally see this PR get over the line. Is there anything you need help with?

I'm not sure whether to push it before closing the rest of the open issues or not.
This change would prevent people who are using the previous versions from enjoying the benefits of bugfixes/features that will be done based on the current implementations.

V1, will include SDK v3 support out of the box, along with a big re-write of most of the current code.

At the same time, we could make a wrapper above the SDK v3 client, like mentioned in one of the above comments. If anyone wants to create a PR for this, go for it.
Unfortunately, I don't think I'll be able to work on this and test it thoroughly before mid-ish January.

@darbio
Copy link
Contributor

darbio commented Dec 20, 2022

What is the timeframe for v1? That might answer the question..

If it's less than 6 months, I'd say we wait. If it's more then we build a wrapper as discussed.

@naorpeled
Copy link
Collaborator

What is the timeframe for v1? That might answer the question..

If it's less than 6 months, I'd say we wait. If it's more then we build a wrapper as discussed.

There's no set date at the moment,
but I'm hoping and feel it will be in the 6 months zone and not more.
(this is purely my estimation)

@mkovel
Copy link

mkovel commented Mar 9, 2023

Hi, any news with this PR ?

@naorpeled
Copy link
Collaborator

naorpeled commented Mar 9, 2023

Hey everyone,
due to AWS's decision to make AWS SDK v2 go into maintenance mode soon, I'll be going over this PR asap and get this merged OR migrate the latest codebase to use V3.
Not sure if later today but will try my best to do it this week.

@jvgeee
Copy link

jvgeee commented Mar 21, 2023

@naorpeled How close is this next update out of interest?

@naorpeled
Copy link
Collaborator

naorpeled commented Mar 27, 2023

@naorpeled How close is this next update out of interest?

I hope we'll be able to release it sometime during this weekend or next week 🙏

@naorpeled
Copy link
Collaborator

Hey everyone,
this was released in v0.8 😎 !

@naorpeled naorpeled closed this Apr 8, 2023
features automation moved this from In progress to Done Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet