1
00:00:00,240 --> 00:00:05,550
In this video we are going to learn Ada Lovelace Lambda Use cases for invocation types.

2
00:00:06,090 --> 00:00:11,830
So Lambda Functions articles are the core components of building applications on a lambda.

3
00:00:12,030 --> 00:00:15,780
A lambda function is the code and the runtime that process the events.

4
00:00:15,780 --> 00:00:21,600
While a trigger is the service that invokes the function, you can see the image on the slide.

5
00:00:21,600 --> 00:00:24,930
Let me say one by one the example use cases.

6
00:00:24,930 --> 00:00:27,690
The first use case is file processing.

7
00:00:27,780 --> 00:00:30,480
Suppose that you have a photo sharing application.

8
00:00:30,480 --> 00:00:36,540
People use application to upload photos and the application application stores these user photos in

9
00:00:36,540 --> 00:00:37,980
the Amazon S3 bucket.

10
00:00:38,130 --> 00:00:44,070
Then our application creates a thumbnail version of each user photos and display them on the user's

11
00:00:44,070 --> 00:00:44,970
profile page.

12
00:00:44,970 --> 00:00:51,810
For that purpose, we will use the Amazon S3 event, which is the uploaded object into bucket event

13
00:00:51,810 --> 00:00:53,760
and triggered the lambda function.

14
00:00:53,940 --> 00:00:57,810
And another use case is data and analytics.

15
00:00:57,810 --> 00:01:04,050
So you can think that we are building an analytic application and storing raw data in dynamic DB table.

16
00:01:04,050 --> 00:01:10,320
So when you write update or delete items in a table dynamo DB C teams can publish item and update event

17
00:01:10,320 --> 00:01:13,230
to stream and invoke the lambda function.

18
00:01:13,530 --> 00:01:16,860
And another use case is the web application.

19
00:01:17,160 --> 00:01:23,340
And suppose that you are creating a website and you want to host the back end logic on lambda so we

20
00:01:23,340 --> 00:01:30,480
can invoke our lambda function over the HTTP using the Amazon API gateway with the HTTP endpoint.

21
00:01:30,930 --> 00:01:33,930
And another use case could be the mobile application.

22
00:01:34,020 --> 00:01:35,370
And think about that.

23
00:01:35,370 --> 00:01:40,320
We have a custom mobile application that produced the events and we can create a lambda function to

24
00:01:40,320 --> 00:01:44,070
process these events published by our mobile applications.

25
00:01:44,070 --> 00:01:48,240
So it is Lambda supports main services as an event sources.

26
00:01:48,240 --> 00:01:53,550
When you configure these event sources to trigger a lambda function, the lambda function is invoked

27
00:01:53,550 --> 00:01:55,530
automatically when events occur.

28
00:01:55,680 --> 00:02:01,920
So we can also define event source mapping, which is how you identify what events to take and which

29
00:02:01,920 --> 00:02:03,540
lambda function is to invoke.

30
00:02:03,690 --> 00:02:09,390
So far we only see the lambda invocations with synchronous way.

31
00:02:09,390 --> 00:02:16,230
From now on we will develop lambda functions be triggered asynchronously and even source mapping invocations.

32
00:02:16,320 --> 00:02:21,300
So according to different invocation types, we will implement two hands on labs.

33
00:02:21,300 --> 00:02:23,490
The first one is the Amazon.

34
00:02:23,490 --> 00:02:26,820
S3 pushes the events and invokes a Lambda function.

35
00:02:26,820 --> 00:02:34,110
Amazon S3 can publish event of different types of actions like put post copy and delete object events

36
00:02:34,110 --> 00:02:34,920
on a bucket.

37
00:02:34,950 --> 00:02:40,770
Using the bucket notification feature, we can configure an event source mapping that directs to Amazon

38
00:02:40,770 --> 00:02:45,270
S3 to invoke a lambda function when a specific type of the event occurs.

39
00:02:45,270 --> 00:02:49,850
So this is the first hansen-love and the second time zone loop is the address.

40
00:02:49,920 --> 00:02:57,150
Lambda pulls the event from a kinesis or Dynamo DB streams and invokes a lambda function for pol based

41
00:02:57,150 --> 00:02:58,200
event sources.

42
00:02:58,240 --> 00:03:03,930
Edible Islam, the pulse, the source and then invokes the lambda function when records are detected

43
00:03:03,930 --> 00:03:05,040
on that source.

44
00:03:05,040 --> 00:03:06,900
So you can see the image on the slide.

45
00:03:06,900 --> 00:03:10,540
The first hands on lab is the Amazon S3 asynchronous.

46
00:03:10,560 --> 00:03:17,190
The trigger is lambda when uploading an image, and the second handle is the event source mapping.

47
00:03:17,190 --> 00:03:24,300
Pulling in location, we add item into Q, which will be the Amazon case Q and this will be a pull from

48
00:03:24,300 --> 00:03:26,670
the Lambda and invoke a function.

49
00:03:26,670 --> 00:03:28,980
And also there will be a dynamic DB.

50
00:03:28,980 --> 00:03:35,100
Dynamic DB streams happened and after that this stream will be pulled from the database lambda and invoke

51
00:03:35,100 --> 00:03:35,760
the function.
