In this video, we are going to create a three client Node.js module for connecting SW three.
So let's get started.
For that purpose, please open the we just do a code and as you remember that here you can see this
is the our Node.js application.
Now I'm going to create a separate Node.js module for the client object.
So for all the interactions we need to connect S3 for that purpose, we should create or establish a
static client object.
So that means instead of we are creating a new client for every SDK request.
It is best practice to create a separate Node.js module and use this module for every particular SDK
command.
For that purpose, I'm going to open the Section 21 and lecture for the crud.
And you can remember that we have created Dynamo DB client object before and we will use these kind
of commands and calls into our S3 client.
So I'm copy this internal code and after that in the lecture folder, I'm going to create a new file
which is the S3 client that JS and paste all this course into S3 client JS file.
Now I can close and focus on the client JS file.
If you save this file, you can see that first of all, I'm going to change these package name.
The package name will be the client S3 and the import segment should be the S3 client object.
And after that region can be leave as it is.
And now in here I'm going to create an S3 client and export this S3 client with creating the S3 client
object.
Lock and pasting the region information lock.
As you can see that we have created Node.js module for HDD connections with creating any instance of
the HDD client object with passing information.
This client object will use every interaction with our sdhc examples.
So if you click Create and save these A's to the client JS file now we will use these objects in order
to perform these use cases and pasting these commands into our SDK libraries.