From the course: Complete Guide to Serverless Web App Development on AWS

Unlock this course with a free trial

Join today to access over 24,600 courses taught by industry experts.

Challenge: Extend your API

Challenge: Extend your API

(lively upbeat music) - [Instructor] It is time to put your skills to a test with a new challenge. Let's build the update API for our backend and integrate it into our web app. Your task is to implement the update API, which will handle two scenarios. Updating the text of a task and marking the task as complete. In the infrastructure, you need to create the update API. So this is the API. You're going to use the patch method and you're going to use /todos/{id} as we did with the delete. The body for toggling the completion of a task, you're basically going to get the completed through, and if you're going to change the title of a task, you're going to pass the new title. In the backend, basically the Lambda function, you'll need to create two methods. One to handle the task completion, and another one to update the task title. And for both methods, you will first need to fetch the item using the GSI, the global secondary index, and then use the UpdateCommand to modify the attributes…

Contents