What's the difference between aws-sdk and @aws-sdk/client-s3
I saw different codes in javascript and some libraries have the @ symbol infront of them, for aws, I saw:
var aws = require("@aws-sdk/client-s3");
var aws = require("aws-sdk");
What's the difference between the two syntax and are they relatable?(e.g. the first syntax is referring to something inside of the aws-sdk library?) and what's the use/meaning/purpose of the @ symbol while importing a library?
var aws = require("@aws-sdk/client-s3");
The above code snippet is an example of AWS JavaScript SDK v3
var aws = require("aws-sdk");
The above code snippet is an example of AWS JavaScript SDK v2
what's the use/meaning/purpose of the
@symbol while importing a library
From the reference linked below:
In v3 of AWS SDK for JavaScript, we achieved modularity by breaking the JavaScript SDK core into multiple packages and publishing each service as its own package. These packages are published under @aws-sdk/ scope on NPM to make it easy to identify packages that are part of the official AWS SDK for JavaScript.
Reference:
https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/