How to Create an Authenticated REST API on AWS with API Gateway, Lambda, Cognito, & AWS Amplify
In this video I'll use the Amplify CLI to deploy a REST API backed by AWS Lambda and then connect to the API from a client-side project using React. I'll show how to configure the REST API to enable a Cognito Authorizer, only allowing authenticated requests to interact with the endpoint. I'll also show how to securely access the user's identity in the Lambda function event.
Here is some of the code I used: gist.github.com/dabit3/1f61f6...
Пікірлер: 73
How can I pull the cloudformation template from the cloud? Whenever I re-deploy my amplify project, the Authorizer is gone because it was not added to the template in the first place.
Nowadays, Amplify encourages you to use Amplify to spin up your dev and production environment using the CLI. This means that most of your configuration should be done through the CLI so Amplify can keep track of different changes (to Cloudformation resources, I guess). Will Amplify "know" about the changes you do (e.g. setting up your API Gateway to use Authorizers) through the AWS Console UI?
I was actually hoping to see same exact tutorial but backend (rest api, lambda, cognito) built with CDK instead of amplify cli
Maybe consider saying log instead of “log out” when printing because you’re constantly saying “log out user” when printing user to the console
Why when I update my API it deletes the Cognito Authorizer created from AWS Console?
default Authorization when restricting API with "add auth" by Cognito is "Auth: AWS IAM" ?
how can i do the same with custom ui?
I guess amplify as a default export is deprecated and you would need to import it as a named export: import { Amplify } from 'aws-amplify'
How can i use amplify to configure the api gateway authorizer? So i can make i repeatedly?
How do you deploy updates to the lambda function?
This was super helpful in 2023; thank you so much!
Love that you were able to condense so much information in a short video, gw!
Thank you so much for doing videos like this. I've been learning amplify for the last 4 months using your videos to help me for projects at work. I'm just about to put my first app into production in the next couple of weeks
Step by step and detailed video in reasonable span!! Thank you so much 🙌🏼
Thank you, I spent 2 days looking for just this. Great video, straight to the point
Fantastic Nader, I have been exploring exactly this and you helped me out immensely! Thanks! I've been working a lot with Amplify and Amplify Admin (since its been out) and fine grained access has been interesting. I am tracking you and the team for all the content you can put out, so thanks a lot man!
Incredible, spent a lot of time trying to find this material, thank you
Thanks Nader, spent all day on this before finding your video.
Wow. how come the freaking youtube algorithm did not suggest this video to me?
Thanks for this video, definitely got me a