0

I am learning how to use aws-sdk version 3. AWS document says that to import the modular package from version 3 we have to use below command:

yarn add @aws-sdk/client-dynamodb

I do not understand this yarn command, because my understanding is that @ is a special character and has to be used to specify version of a specific package e.g. yarn add packagename@version. Can we have also package name starting from @?

Also when I run the command yarn add @aws-sdk/client-dynamodb, I get by default version 3.3.0. How can I specify a specific version (e.g. 3.0.0) in the above command.

In yarn registry the latest version yarn add aws-sdk is 2.8. So does this mean that there is no way to add full package of aws-sdk v3, and only way is to go module by module?

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
  • 1. Yes, it's a *scoped* package: https://www.npmjs.com/package/@aws-sdk/client-dynamodb. 2. With *another* `@`: `@scope/package@version`. – jonrsharpe Jan 25 '21 at 10:49
  • Many Thanks All, this was very helpful , though will still do my research on for aws-sdk v3 how can i install teh whole library, because as of now it seems only way is to go with its modular structure and install componment by componenet. – Smarann Educations Jan 25 '21 at 13:45
  • Yes, that's one of the features they explicitly call out: [*"has a modular architecture with a separate package for each service"*](https://github.com/aws/aws-sdk-js-v3). The old way meant you had a lot of unused code for the services you didn't use. – jonrsharpe Jan 25 '21 at 13:47

0 Answers0