Okay, in the last lecture, we created our first brand new endpoint, which we create an inventory. Now let's create a couple of other endpoints, like update an inventory, getting all the inventories, and update an inventory. Of course, let's, let's get all the inventories which are in dynamodb. Let's name this resource as inventories. So we can retrieve all the inventories which are in Dynamo dB. Of course, we are going to repeat the same sort of steps that we did in the last lecture.
I'm going to create quickly inventory since it is going to be a get GET request. So we are going to retrieve all the inventories. So let's choose get method in this context. Of course, we need to define lambda functions. Also, make sure you check Lambda proxy integration and use default timeout that doesn't hurt because they will be pretty quick. Now let's enable proxy integration.
And let's choose get inventory lambda function that we created a couple of lectures back. Let's save this resource, it will ask you for a permission which AWS will do itself on your behalf. And let's create and since we are not going to worry about authorization in this context, so let's skip the authorization. Let's create an enable course in this. So just course we have already touched what course is all about. Now we have created an endpoint, which will fetch all the inventor is from Dynamo dB.
Now let's create another resource which will To lead and inventory from the dynamodb inventory table, so create a resource called delete. This time, we can go after a delete method. But for the sake of simplicity, we are going with post. You can choose an option, any suitable option. But let's go with post in this context, let's choose proxy integration, choose lambda function. So this again, the same process, it's going to ask you the necessary permissions.
Let's give the permission here. And as we did in the earlier endpoints, method request, we're not going to worry about it. Let's keep it you know, non authorization. We don't want to authorize and let's enable course again, we don't have to talk about costs. Again, we had briefly touched course, in the last lecture and we are just going to repeat the same set of steps here. Let's now update an inventory.
So update resource. Let's create a resource. And let's create a method, a method. We can also go with books, but let's not worry about option here. Let's go with post in this case. And once that resource has been created, don't assume Don't forget to check lambda proxy integration, update inventory function, save, it's gonna ask again the permission let's do that.
And once the required permissions or permission, have been given, we are going to choose authorizes and none because we are not offered any sort of authorization at this point of time. Enable costs Again, same sort of steps, nothing hard, nothing tough in this in here. And once we have created all those endpoints, what we have to do, remember, yeah, we have to deploy your API's. And let's choose the cleanest deployments days. and deploy all those API's. The moment we deploy all the API's, of course, the generic or the common endpoint is going to be saved.
And you can access all those methods, all those API's, respectively by their own endpoint use. So create an inventory, create, delete, inventories and update. So we created all the necessary API to we needed to create and let's test those API is now using a service called postman which is completely free in the next lecture.