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.

Solution: Add an API with an authorizer

Solution: Add an API with an authorizer

(jaunty upbeat music) - [Instructor] So let's see how I solve this challenge. Let's go first to our infrastructure and to our backend stack. Here we have add the method options to the delete, to the get and to the post, but we haven't added to the update. So let's do that. Good. Now we can deploy these changes, npm run build and then let's deploy. This will deploy all the changes. While this deploys, we can go to our web app and do the changes there. So in our web app, we need to modify the API and we are going to modify the update. So we have already passed the authorization header in all the other methods except into the update, so let's do that and here we already have the header. So we are just going to bring the authorization header with a token that we have in the signature. And with that, now we can test locally. But first let's make sure that the backend has deployed. Yes, so let's run this locally and try it. npm run dev, and this should open the local host. Local host is…

Contents