1
00:00:00,180 --> 00:00:07,200
In this video, we are going to understand Amazon S3 interactions working with the buckets and objects

2
00:00:07,320 --> 00:00:10,050
before we developing Node.js Lambda functions.

3
00:00:10,050 --> 00:00:12,870
We should understand the basics of the S3.

4
00:00:12,900 --> 00:00:18,690
After that, it will be very clear to interact with S3 from our Node.js lambda functions.

5
00:00:18,960 --> 00:00:28,230
So the idea is that you should think Amazon S3 as a resources and S3 exposed available APIs that we

6
00:00:28,230 --> 00:00:30,420
can call from our Lambda functions.

7
00:00:30,420 --> 00:00:32,490
We're using a SDK.

8
00:00:33,060 --> 00:00:39,270
So let's see how can how we can interact Amazon S3 interactions working with the buckets and object.

9
00:00:39,270 --> 00:00:42,000
For that reason, we should read the official documentation.

10
00:00:42,000 --> 00:00:50,640
If you open the official documentation, basically you can see that this is the Amazon S3 Rest API documentation.

11
00:00:50,760 --> 00:00:57,930
That is the API documentation that expose these APIs to perform actual operations into S3.

12
00:00:58,170 --> 00:01:05,820
And if you click these, expand these link and see the actions, basically the Amazon S3 API are grouped

13
00:01:05,820 --> 00:01:13,470
into three sets Amazon S3, Amazon S3 control, Amazon S3 on outposts.

14
00:01:13,920 --> 00:01:21,110
So in general, APIs that apply bucket and object level actions are in the Amazon S3 set, and the API

15
00:01:21,120 --> 00:01:25,410
did API accountable actions in the S3 control set.

16
00:01:25,590 --> 00:01:33,290
And also we can use the S3 outpost to create a set of buckets on a list.

17
00:01:33,330 --> 00:01:40,650
Amazon are supposed to easily store and retrieve object on premises, so these are the main sets from

18
00:01:40,650 --> 00:01:42,840
the actions of the Amazon.

19
00:01:42,840 --> 00:01:50,100
S3 So after we have learned the basics, we can see that how we can interact these methods for our Lambda

20
00:01:50,100 --> 00:01:52,800
functions or Node.js functions using the SDK.

21
00:01:52,800 --> 00:01:59,580
If you come here, that means if you click the Amazon S3, the main part, you can see the list of the

22
00:01:59,580 --> 00:02:06,270
actions that is performing from the Amazon S3 These are the Web services that expose from the Amazon

23
00:02:06,270 --> 00:02:10,590
S3 You can see the create bucket, delete bucket, for example, see the create bucket.

24
00:02:10,620 --> 00:02:17,610
If you scroll down, you can see the an example structure, how we can send the request of these create

25
00:02:17,610 --> 00:02:18,360
bucket operations.

26
00:02:18,360 --> 00:02:22,080
And these are the parameters that we can get the detailed information.

27
00:02:22,080 --> 00:02:28,770
So delete bucket and you can scroll down and see the create object, delete object, upload object and

28
00:02:28,770 --> 00:02:30,960
get bucket policy and so on.

29
00:02:30,960 --> 00:02:38,790
So these are the lists of the Amazon S3 Web services that expose from the Amazon S3 API that we will

30
00:02:38,790 --> 00:02:43,800
use during the course with these actual APIs to perform our use cases.

31
00:02:43,800 --> 00:02:51,840
So after that, after learn the basic APIs from the Amazon S3, we can think about that, how we can

32
00:02:51,840 --> 00:02:55,740
interact these Web services from our Lambda function or Node.js function.

33
00:02:55,740 --> 00:03:04,260
We're using the SDK libraries for that purpose is you remember that we have S3 client library from the

34
00:03:04,890 --> 00:03:06,810
SDK for JavaScript version three.

35
00:03:06,810 --> 00:03:12,480
So we will use these client S3 package in order to perform all this action.

36
00:03:12,480 --> 00:03:17,190
So you can scroll down and see the example usage in here.

37
00:03:17,190 --> 00:03:20,640
And also in the right hand side, you can see the command section.

38
00:03:20,640 --> 00:03:26,490
So this command is representing to our actual operations, for example, create bucket and so on.

39
00:03:26,610 --> 00:03:28,830
See that Amazon S3 has create bucket.

40
00:03:28,830 --> 00:03:32,460
And in the SDK package, most probably we have create bucket command.

41
00:03:32,460 --> 00:03:36,810
So this command is invoke the create bucket of the Amazon S3 API.

42
00:03:37,050 --> 00:03:44,280
That means we will use these S3 client NPM packages in order to interact with the Amazon S3 and perform

43
00:03:44,280 --> 00:03:45,090
use cases.

44
00:03:45,090 --> 00:03:50,850
So this is our way of working to identify our interactions and see the example course and apply the

45
00:03:50,850 --> 00:03:55,920
best practices and develop our lambda functions are using a basic libraries.

46
00:03:55,950 --> 00:04:02,490
Now we will follow these informations and start to develop our Node.js project with using a basic JavaScript

47
00:04:02,490 --> 00:04:05,220
version three to interact with the Amazon S3.
