In this video, we are going to do a hands on loop, which is the wild card microservices with rest
API and lambda.
So we are going to develop a system that synchronous microservices with Amazon API, Gateway Rest API.
You can see the image on the slide.
Basically, we will create a lambda function using the lambda console.
After that, we will create the rest API.
This time we will create this API using the API gateway console.
And after that we invoke our API from the client application so you can see the image, what we put
in this video, when we invoke our rest API API gateway to the request to our lambda function, lambda
runs the function and returns response to API Gateway and so on.
Back to our client application.
This time we will again create a same HTTP method and we are creating a product API, but the request
will be invoked.
The API is lambda will be differentiate because this time we will create a rest API rest API invoke
database lambda with different event object.
And these images object include different attributes from the HTTP API.
So for that purpose we will design and develop a lambda function according to these request event JSON
objects.
Let's create this architecture diagram with a console.
I'm going to start with creating any lambda function.
Please go to the lambda section and create a new function.
So this function will be the similar and basic lambda function.
So let's create a lambda function for that purpose.
I'm going to give the name for that function.
And runtime will be the Node.js and leave as it is for the other configuration and click the create
function button.
For this example.
And also during the whole course, we use the default Node.js runtime for our lambda functions.
Lambda runs our code only when needed and scales automatically from a fee request per day and 1000 requests
per day.
It is automatically scaled and fully serverless compute service OC.
As you can see that we have created the lambda function and it is basically the turn back to 200 code
and the body information.
We can modify our lambda function as long as function response align with the incoming event from the
API Gateway Rest API.
We will see in the developments in the next video.
For now, let's see the default lambda function.
So as you can see, that lambda function is required for the logging incoming event.
For that purpose I'm going to copy paste this line of code you can find from the error section code
in the console log operation.
Basically we will income, we will lock incoming event from the rest API and deploy the function.
So I'm not going to change anything for now.
In the next video we will develop this lambda function.
After understanding the understanding the incoming event JSON from the rest API.
But before that, let's create API Gateway Rest API.