1
00:00:00,300 --> 00:00:06,240
In this video, we are going to do a hands on loop, which is the wild card microservices with rest

2
00:00:06,240 --> 00:00:07,740
API and lambda.

3
00:00:08,280 --> 00:00:14,700
So we are going to develop a system that synchronous microservices with Amazon API, Gateway Rest API.

4
00:00:14,880 --> 00:00:16,760
You can see the image on the slide.

5
00:00:16,770 --> 00:00:21,390
Basically, we will create a lambda function using the lambda console.

6
00:00:21,420 --> 00:00:23,760
After that, we will create the rest API.

7
00:00:23,790 --> 00:00:27,540
This time we will create this API using the API gateway console.

8
00:00:27,720 --> 00:00:34,170
And after that we invoke our API from the client application so you can see the image, what we put

9
00:00:34,170 --> 00:00:41,760
in this video, when we invoke our rest API API gateway to the request to our lambda function, lambda

10
00:00:41,760 --> 00:00:45,380
runs the function and returns response to API Gateway and so on.

11
00:00:45,390 --> 00:00:47,490
Back to our client application.

12
00:00:47,490 --> 00:00:55,800
This time we will again create a same HTTP method and we are creating a product API, but the request

13
00:00:55,830 --> 00:00:57,000
will be invoked.

14
00:00:57,000 --> 00:01:04,070
The API is lambda will be differentiate because this time we will create a rest API rest API invoke

15
00:01:04,080 --> 00:01:07,260
database lambda with different event object.

16
00:01:07,260 --> 00:01:12,030
And these images object include different attributes from the HTTP API.

17
00:01:12,060 --> 00:01:19,320
So for that purpose we will design and develop a lambda function according to these request event JSON

18
00:01:19,320 --> 00:01:20,070
objects.

19
00:01:20,220 --> 00:01:23,370
Let's create this architecture diagram with a console.

20
00:01:23,400 --> 00:01:26,400
I'm going to start with creating any lambda function.

21
00:01:26,400 --> 00:01:32,400
Please go to the lambda section and create a new function.

22
00:01:33,150 --> 00:01:37,380
So this function will be the similar and basic lambda function.

23
00:01:37,380 --> 00:01:41,340
So let's create a lambda function for that purpose.

24
00:01:41,340 --> 00:01:44,040
I'm going to give the name for that function.

25
00:01:46,780 --> 00:01:52,300
And runtime will be the Node.js and leave as it is for the other configuration and click the create

26
00:01:52,300 --> 00:01:53,140
function button.

27
00:01:54,340 --> 00:01:55,410
For this example.

28
00:01:55,420 --> 00:02:00,700
And also during the whole course, we use the default Node.js runtime for our lambda functions.

29
00:02:00,820 --> 00:02:08,020
Lambda runs our code only when needed and scales automatically from a fee request per day and 1000 requests

30
00:02:08,020 --> 00:02:08,430
per day.

31
00:02:08,440 --> 00:02:12,850
It is automatically scaled and fully serverless compute service OC.

32
00:02:13,000 --> 00:02:19,150
As you can see that we have created the lambda function and it is basically the turn back to 200 code

33
00:02:19,150 --> 00:02:20,530
and the body information.

34
00:02:20,650 --> 00:02:26,530
We can modify our lambda function as long as function response align with the incoming event from the

35
00:02:26,530 --> 00:02:27,880
API Gateway Rest API.

36
00:02:28,180 --> 00:02:31,030
We will see in the developments in the next video.

37
00:02:31,060 --> 00:02:33,540
For now, let's see the default lambda function.

38
00:02:33,550 --> 00:02:39,010
So as you can see, that lambda function is required for the logging incoming event.

39
00:02:39,010 --> 00:02:45,100
For that purpose I'm going to copy paste this line of code you can find from the error section code

40
00:02:45,100 --> 00:02:47,010
in the console log operation.

41
00:02:47,020 --> 00:02:54,310
Basically we will income, we will lock incoming event from the rest API and deploy the function.

42
00:02:54,310 --> 00:02:57,070
So I'm not going to change anything for now.

43
00:02:57,100 --> 00:03:00,170
In the next video we will develop this lambda function.

44
00:03:00,190 --> 00:03:04,440
After understanding the understanding the incoming event JSON from the rest API.

45
00:03:04,450 --> 00:03:08,470
But before that, let's create API Gateway Rest API.
