In this video I'm going to show you.
And another way to create rest API.
We will create rest API from the lambda function with adding the API gateway trigger.
So this is the shortcut of creating API gateway and lambda function with a console.
Let's open the console and create a new function.
For example, let's say taste function.
Create a new function.
And this time we will create rest API from the lambda function itself with adding the API gateway trigger.
As you can see that there is a there is a window that we can see lambda function, name layers, tickers
and destinations.
So this time I'm going to create a rest API from the lambda function.
We are not going to create from the API gateway.
We will create this API in this window with adding the trigger.
Click a trigger button and see that lambda function can be triggered different resources.
So this time I'm going to create an API gateway trigger.
So this will be the rest API and we can create a new API.
We can see that we can choose API, type in here, http and rest api.
I would like to choose rest api.
I don't set any security so that's why we should set the open.
And if you would like to set additional settings, you can change this configuration.
Also, I'm not going to change any configuration and click to add button.
So this will create an rest API gateway into the API Gateway section and this will trigger our test
function to do so.
You can check the Lambda Configurations.
If you come to configurations and come to triggers, you can see the API gateway issue, right click
and open it up.
You can see the API gateway definition on the API gateway page.
So basically it is create a test function and any method and this will be lambda proxy.
And in this request directing to the lambda test function all configuration handled by the A with adding
trigger to our lambda function.
You can see this stage, there is a default stage and test function.
Handle all the exit method because the resource definition with any OC as you can see that we can see
the triggers and you can check the URL API and point in here and also check from the API gateway states.
So for example, come to Lambda function and if you expand the database you can see the test also.
So if you right click and open it up, you can directly invoke lambda function from the rest API gateway.
This is the shortcut of how we can create rest API over the API from the lambda function when we select
trigger to the lambda function.