AWS SDK for JavaScript V3 support
tmclaugh opened this issue ยท 6 comments
As a user I can mock calls from the v3 SDK in developer preview (https://github.com/aws/aws-sdk-js-v3) so I can begin using the new SDK without losing the ability to test.
Just want to get an idea of whether this is on the roadmap anywhere. Not sure what AWS's own roadmap is for the new SDK either.
@tmclaugh good question and thanks for opening this issue. ๐
We are investigating the V3 SDK. Beyond the modularity (which is a welcome improvement),
what functionality are you hoping to use?
I don't want any more functionality than there is currently in aws-sdk-mock. I'm a TS/JS newbie but have used moto in Python projects.
One issue I do see is aws-sdk-mock supporting both the v2 and v3 APIs available in aws-sdk-js-v3. I'm fine using the older v2 API as a start.
I want to save my RAM, for example. With ts aws-sdk typescript eats 400MB RAM extra
As a note, some have found that this library is not needed when using aws-sdk v3: aws/aws-sdk-js-v3#1156
I've created an equivalent of aws-sdk-mock
for the v3 SDK: aws-sdk-client-mock
Similarly to this great lib, does not depend on Jest or any other unit testing framework and uses Sinon.js under the hood for highly customizable mocks. Additionally, is fully typed, which helps writing mocks.
I have decided to create a separate lib, as the approach is quite different, and it's written in TS, not JS. Does not yet support v2-style API, but I plan to add it soon.
Just to update this for anyone else ending up here, the AWS-SDK for JS team officially recommends @m-radzikowski's library (aws-sdk-client-mock) in the comment just above this one in their blog.
Adding this context to save anyone else the trouble of reading through @dmattia's extremely helpful linked thread which lead me there before realizing the author of the library recommended in the conclusion of that thread is the one commenting just above me here. ๐