1
00:00:00,240 --> 00:00:01,110
In this video.

2
00:00:01,110 --> 00:00:04,320
We are going to continue our hands on lap.

3
00:00:04,530 --> 00:00:07,260
And this video we will create a web socket API.

4
00:00:07,290 --> 00:00:13,350
As you can see in here, we will create a web socket API for our hands on loop and we will also check

5
00:00:13,350 --> 00:00:14,280
the application.

6
00:00:14,460 --> 00:00:20,100
As you remember that we have created lambda function in the architecture diagram we see for different

7
00:00:20,100 --> 00:00:20,760
lambda function.

8
00:00:20,760 --> 00:00:25,170
But I will be accommodate all these rods in one lambda function.

9
00:00:25,170 --> 00:00:30,180
So that's why I have create one lambda function and now I'm going to create a web socket API.

10
00:00:30,270 --> 00:00:32,760
So let's get started for that purpose.

11
00:00:32,760 --> 00:00:37,470
Please open the API gateways, come to API Gateway.

12
00:00:37,500 --> 00:00:44,640
Let me open a new API gateway page and we will create a web socket API, create an API, select the

13
00:00:44,640 --> 00:00:49,020
web socket API build and this will be the chat application.

14
00:00:49,020 --> 00:00:54,240
So give the name web socket this chat and we will follow the same steps.

15
00:00:54,240 --> 00:01:00,270
What we have done in the last video, we will create a raw selection expression with the request that

16
00:01:00,270 --> 00:01:01,740
body dot action action.

17
00:01:01,740 --> 00:01:07,140
Because we will send this kind of message to the our website API.

18
00:01:07,170 --> 00:01:11,850
We will send action and the message according to action we will root these customers.

19
00:01:11,850 --> 00:01:19,290
So that's why please write the cares body that action click the next button and we will select the connect,

20
00:01:19,290 --> 00:01:25,230
disconnect and default root because you can see in the image we will connect, default and disconnect.

21
00:01:25,230 --> 00:01:29,310
And also we have a send message customer for that purpose.

22
00:01:29,340 --> 00:01:38,010
Go back to our management console, scroll down and we should add a custom lot, which is the send message.

23
00:01:38,010 --> 00:01:43,140
So let me come here and add a custom lot.

24
00:01:43,140 --> 00:01:49,650
And in the custom world I'm going to write the send message and click the next button.

25
00:01:49,650 --> 00:01:52,620
So this time we will attach the integrations.

26
00:01:52,620 --> 00:01:58,500
All the integrations should be the lambda function and the lambda function should be the or chat function.

27
00:01:58,620 --> 00:02:05,310
So this is very similar what we have done in the last video, but this time we will implement our lambda

28
00:02:05,310 --> 00:02:06,000
function.

29
00:02:07,100 --> 00:02:14,030
So that's why we should add all these rod integrations to the chat function.

30
00:02:14,690 --> 00:02:21,230
Make sure that you have integrated to correct lambda function and click the next button and we will

31
00:02:21,230 --> 00:02:23,270
stage as a production.

32
00:02:23,270 --> 00:02:31,670
This is predefined stage for API Gateway and click the next button review and create our web socket

33
00:02:31,670 --> 00:02:34,220
API for service chat application.

34
00:02:34,280 --> 00:02:36,110
Click the Create and Deploy button.

35
00:02:39,460 --> 00:02:39,680
Okay.

36
00:02:39,760 --> 00:02:45,180
We have successfully create web socket API and lambda function for our server state application.

37
00:02:45,190 --> 00:02:46,660
We will work with console.

38
00:02:46,660 --> 00:02:53,290
You can see the routes and we have a route selection exploration and we have for route to communicate

39
00:02:53,290 --> 00:02:56,320
with the chat function lambda function.

40
00:02:56,320 --> 00:03:04,780
So after verified these states, we can go to the stage and select the production and make sure that

41
00:03:04,780 --> 00:03:08,020
this connection is up and running for that purpose.

42
00:03:08,050 --> 00:03:12,430
Go to the or py socket to test our web socket.

43
00:03:12,430 --> 00:03:24,280
So let me remove this basis and paste your w w s which communicate with our latest soulless chat web

44
00:03:24,280 --> 00:03:25,180
socket API.

45
00:03:25,210 --> 00:03:28,780
Click the let me clear and click the connect.

46
00:03:30,150 --> 00:03:30,600
Okay.

47
00:03:30,600 --> 00:03:36,660
We can use this URL for connect and interaction with our web socket API and we have successful test

48
00:03:36,660 --> 00:03:38,550
our web socket API.

49
00:03:38,550 --> 00:03:44,490
And this is that is to make sure that you have successfully connect your web socket API.

50
00:03:44,520 --> 00:03:50,790
Just we create for the web socket chat application as you can see that we have successfully create the

51
00:03:50,880 --> 00:03:53,520
socket API and test our website API.

52
00:03:53,550 --> 00:03:58,500
In the next video, we will understand how we abstracted API trigger to the lambda function.
