Hi, Adrian, and welcome back.
Now, in today's video, we'll look into how we can create a rest API through API gateway.
Now, our overall implementation architecture here is very simple is you create a REST API and this
API will invoke a backend lambda function.
So the users through the API should be able to get the response from lambda.
Now the first resource that we'll be creating is the lambda function.
So from the Lambda Service, let's go ahead and quickly create a function.
I'll say Hello lambda function all and we'll go ahead and create a function.
Once the function is created, you can go to the API gateway service and this time we'll be creating
a rest API.
Let's quickly build this API.
Now within a year, you have to select the protocol as rest.
And in the Create new API, I'll select the new API.
Let's just call it as the rest API, the endpoint type.
We'll just keep it regional, which is the default, and I'll go ahead and create an API.
All right.
So once this API is created, it is still not yet integrated with the lambda function.
So this is something that we need to do.
So let's do one thing.
Let's go ahead and we'll create a method of get.
And the integration type would be lambda function, the lambda we had created in the AP South region
and a lambda function.
Here you can specify the function here in.
So it popped up.
Halo Lambda Functional.
Select that.
We'll click on Save.
We'll click on OC.
So now you can go ahead and in case if you like, you can test things out.
So let's test this to verify if we get the output and we are getting the output, which is halo from
Lambda as expected.
Great.
So once you have tested things out, what you can do, you can go ahead and you can deploy the API.
I'll just call it as dev stage and let's do a deploy.
Once you have deployed under the stages, you will be able to find the invoke URL.
So this is the URL that you can give the clients to connect.
So if you'll open the earlier.
In the output.
You see, we get Halo from Lambda.
Apart from that, since this is a rest API, there are a lot of features associated with it, like throttling
integration of valve client certificates.
You have API keys and many others.
However, we wanted to keep it simple and I hope at this stage you understood on how you can create
the rest API through API gateway.
So with this will conclude today's video.