In this video.
We are going to continue our hands on lap.
And this video we will create a web socket API.
As you can see in here, we will create a web socket API for our hands on loop and we will also check
the application.
As you remember that we have created lambda function in the architecture diagram we see for different
lambda function.
But I will be accommodate all these rods in one lambda function.
So that's why I have create one lambda function and now I'm going to create a web socket API.
So let's get started for that purpose.
Please open the API gateways, come to API Gateway.
Let me open a new API gateway page and we will create a web socket API, create an API, select the
web socket API build and this will be the chat application.
So give the name web socket this chat and we will follow the same steps.
What we have done in the last video, we will create a raw selection expression with the request that
body dot action action.
Because we will send this kind of message to the our website API.
We will send action and the message according to action we will root these customers.
So that's why please write the cares body that action click the next button and we will select the connect,
disconnect and default root because you can see in the image we will connect, default and disconnect.
And also we have a send message customer for that purpose.
Go back to our management console, scroll down and we should add a custom lot, which is the send message.
So let me come here and add a custom lot.
And in the custom world I'm going to write the send message and click the next button.
So this time we will attach the integrations.
All the integrations should be the lambda function and the lambda function should be the or chat function.
So this is very similar what we have done in the last video, but this time we will implement our lambda
function.
So that's why we should add all these rod integrations to the chat function.
Make sure that you have integrated to correct lambda function and click the next button and we will
stage as a production.
This is predefined stage for API Gateway and click the next button review and create our web socket
API for service chat application.
Click the Create and Deploy button.
Okay.
We have successfully create web socket API and lambda function for our server state application.
We will work with console.
You can see the routes and we have a route selection exploration and we have for route to communicate
with the chat function lambda function.
So after verified these states, we can go to the stage and select the production and make sure that
this connection is up and running for that purpose.
Go to the or py socket to test our web socket.
So let me remove this basis and paste your w w s which communicate with our latest soulless chat web
socket API.
Click the let me clear and click the connect.
Okay.
We can use this URL for connect and interaction with our web socket API and we have successful test
our web socket API.
And this is that is to make sure that you have successfully connect your web socket API.
Just we create for the web socket chat application as you can see that we have successfully create the
socket API and test our website API.
In the next video, we will understand how we abstracted API trigger to the lambda function.