1
00:00:00,800 --> 00:00:07,340
In this video we are going to learn from the event sources and destination services.

2
00:00:08,220 --> 00:00:14,100
With Lambda, you can run code for virtually any type of application or backhand services, all with

3
00:00:14,100 --> 00:00:15,450
zero administration.

4
00:00:16,200 --> 00:00:22,320
You can only upload your code and run your code and scale your code automatically with high availability.

5
00:00:22,800 --> 00:00:30,270
So we can also set up our Lambda Code and automatically trigger from other sources or call it directly

6
00:00:30,270 --> 00:00:32,250
any web or mobile applications.

7
00:00:33,360 --> 00:00:40,830
So the typical lambda function there is an event source or trigger, an actual function code and then

8
00:00:40,830 --> 00:00:42,120
there is a destination.

9
00:00:42,510 --> 00:00:49,630
You can see the image in the slide that we have event, source's function and destination.

10
00:00:49,650 --> 00:00:56,730
So basically we have an event sources that trigger the lambda function and after function execution

11
00:00:56,730 --> 00:01:05,070
finished it function can be also destination forward to destination services that can be added services

12
00:01:05,070 --> 00:01:07,500
or any other third party services.

13
00:01:08,100 --> 00:01:14,910
So it is Lambda integrates with other services in order to invoke function or take other actions.

14
00:01:15,180 --> 00:01:21,930
So the event source has a number of services that can directly interact with the lambda.

15
00:01:22,260 --> 00:01:25,560
These events can be almost anything.

16
00:01:26,070 --> 00:01:32,100
I'm talking about event sources now, so that event sources can be almost anything.

17
00:01:32,130 --> 00:01:35,250
They can be an HTTP call or cron jobs.

18
00:01:35,250 --> 00:01:42,150
They can be uploading an object into the S3 bucket and trigger to a lambda function and they can be

19
00:01:42,150 --> 00:01:43,800
changed in the resource state.

20
00:01:43,800 --> 00:01:48,600
They can be a third party call like payment done through the stripe and so on.

21
00:01:48,660 --> 00:01:54,120
So the event is something that happens that triggered to a lambda function to execute.

22
00:01:54,120 --> 00:02:01,680
So that means there's lots of event sources in a list in the place or services and also third party

23
00:02:01,680 --> 00:02:04,170
sources that can be triggered at Lambda.

24
00:02:04,650 --> 00:02:10,980
So after triggering the event two lambda function, lambda launch the execution environment with different

25
00:02:10,980 --> 00:02:11,490
language.

26
00:02:11,490 --> 00:02:17,250
And one time you can basically develop any language and runtime it into a lambda code.

27
00:02:17,250 --> 00:02:23,190
So that means when the lambda is triggering, lambda is launching the execution environment with given

28
00:02:23,190 --> 00:02:29,940
the language and times, you can think it is a spin up into docker container with that runtime and execute

29
00:02:29,940 --> 00:02:37,860
to code and after execution, Lambda has destinations that can be interaction within your code and it

30
00:02:37,860 --> 00:02:40,830
depends your function, business logic and business requirements.

31
00:02:40,830 --> 00:02:48,150
According to your business logic, you can designate and forward your request to do downstream services.

32
00:02:49,410 --> 00:02:56,580
If you look at the use cases of the integrations, a lambda integrates with other services in order

33
00:02:56,580 --> 00:02:59,580
to invoke, function or take another actions.

34
00:03:00,060 --> 00:03:01,800
There are some common use cases.

35
00:03:02,010 --> 00:03:09,150
For example, invoke a function in response to resource lifecycle event such as with Amazon simple search

36
00:03:09,150 --> 00:03:09,570
service.

37
00:03:09,570 --> 00:03:15,120
That means Amazon S3 or this is using database lambda with Amazon S3.

38
00:03:15,150 --> 00:03:21,390
For example, when an object upload the S3 bucket, this event can be triggered a lambda function.

39
00:03:21,390 --> 00:03:27,570
This is also a very common use case and the second use case is responding to incoming HTTP request.

40
00:03:27,930 --> 00:03:30,900
This is using lambda with API gateway.

41
00:03:30,930 --> 00:03:36,630
Typical rest API use cases can be triggered an API gateway and respond back to the client.

42
00:03:37,230 --> 00:03:41,220
And another use case is consume events from the queue.

43
00:03:41,340 --> 00:03:50,610
This is using a lambda with Amazon has basically lambda pull queue records from the case and another

44
00:03:50,610 --> 00:03:53,420
use case is run a function on a schedule.

45
00:03:53,550 --> 00:03:59,820
This is using a lambda with Amazon event cloud watch events informally.

46
00:04:00,090 --> 00:04:05,970
So depending on which service you are using with a lambda, the invocation generally works in one or

47
00:04:05,970 --> 00:04:06,690
two ways.

48
00:04:06,990 --> 00:04:13,590
An event drives the invocation, or lambda pulls a queue or data stream and invokes the function in

49
00:04:13,590 --> 00:04:16,410
response to activity in the queue or data stream.

50
00:04:17,520 --> 00:04:25,290
So I would like to show you also a list of services, Lambda Event Sources, listing of ADA services.

51
00:04:25,320 --> 00:04:30,390
You can find the list of services that invokes to a lambda as an event source.

52
00:04:30,570 --> 00:04:37,920
So the following table, you can see in the slide, you can follow the following table in order to determine

53
00:04:37,920 --> 00:04:40,200
which method of invocation you should use.

54
00:04:40,380 --> 00:04:45,840
And you should also follow the link from the service name and find information about how to set up the

55
00:04:45,840 --> 00:04:47,550
integration between services.

56
00:04:47,670 --> 00:04:52,470
These topics also include example events that you can use to test your function.

57
00:04:52,530 --> 00:04:58,530
We will also see all these different services and invocation types in the upcoming videos.
