AWS Amplify: Adding a RESTful backend to reactjs
HTML-код
- Опубликовано: 23 авг 2024
- Let’s see just how easy it is to have a frontend application store data in a database on AWS.
Under the hood, we’ll be adding Cognito, API Gateway, Lambda, and DynamoDB
For more information on AWS Amplify, checkout the docs: docs.amplify.aws/
To configure AWS Amplify on your local machine: • Installing & Configuri...
Subscribe and follow me on Twitter @mtliendo
I spent the whole weekend reading and seeing various tutorials about exactly this, and you solved all my problems in less than 21 minutes. thanks, dude!
This video is gold bro. I messed around with the cognito sdk which was a nightmare. Amplify all the way!
Nice video, I'm impressed how clear and quick you are! This was exactly what I was looking for, thanks!
Dude excellent video exactly what I was looking for!! much thanks!
KhanDoor happy to hear you found it useful. If there’s anything else you’d like a video on feel free to let me know!
why on earth dont u have more subs you explained everything really damn well! thanks
Thanks! That really means a lot!
@@focusotter just a quick question, lets say you logged out and signed in with a new email/password(basically a new user), then the new user wouldn't be able to see the names of the dogs, right? and if you logged out and logged back in as the user that added the dog names then the names would still be there?
@@khanf13 Hey! Great question. So in this example, the only authorization is that to use the API, you have to be signed in. So all signed-in users will have access to get and update the same set of data. You can extend this example to manually set up those fine-grained permissions, but it can be a bit cumbersome, especially since the graphql API make is much easier to do. If you're interested in exploring that route, I recently answered how to do this in a QnA session: ruclips.net/video/UDchozbS6aA/видео.html
Short, Simple, Clear => Well done
great work! video tip: zoom in a little more than you're comfortable when doing these. remember half your viewers will be watching on their phones.
Thanks, will do! I'm definitely open to more feedback as well :)
Short and sweet! Thank you!
OMG you did tons of things in just 20 minute.And it was very simple.WORK SMART !!! By the way can I do that with MongoDb?Please make more videos
Thank you. You're doing great work for society.
Hi there, your video saved me! Congrats on your new role! I like this kind of short (below 1h) videos building full-stack web app, really useful for beginners who don't even know what to search! I am looking for a video to teach me how to load a welcome page and only show the sign up/ sign in page after you click a button. I am using a tutorial from aws that has Cognito authenticator and s3 storage but loads the auth page at the beginning.
wow, this is soo cool. Please make more these videos.
This is an amazing video! You saved me hours of reading documentation and debugging:)
very very straightforward explanation, awesome.Thnx!
Great tutorial, exactly what I was looking for, thank you.
Excelent video, if i want to delete and edit an item, how could i do?
Great video brother! Learned a lot
I have just started exploring AWS. Your video was a great introduction. Thank u very much. I am trying to add another table to the existing dynamodb. If you have any resource regarding the same, Please share or make a video.. Thanks a lot..
FYI the AmplifySignOut functionality is deprecated and won't work as stated in this tutorial.
Good callout! I’ll have a new video out with an update next week!
a little late and I don't expect you to know or reply, but, what's the font you use in your terminal? looks mint!
Hi i tried your example. i am getting src\App.js
Line 15:2: 'useEffect' is not defined no-undef
what's the best practice ...setPets([...pets, ..resPets]) or just setPets(resPets) and adding pets to the useEffect array?
This is great! How long did it take you to know all of these codes with aws? (E.g. amplify shortcuts)
Legend, thank you!
I really wish I had a magic wand to stop people saying "go ahead and ..." every other sentence.
If you ever get it, go ahead and use it on me!
great tutorial. thanks! can you explain how to get single pet from table? also, i can use post or push to add an item but how do i update an item attribute without overwriting the item? much appreciated.thanks.
@Reynaldo sorry, i have'nt
Can we use AWS Amplify in a microservices architecture app?
Can I use AWS Amplify without an AWS account?
Very, very useful.
Can you make a video with python backend for this?
excellent!
Hey could you tell me what VSC theme you're using? Great video btw :)
Thanks for watching! It’s called Scarlet Protocol Beta
@@focusotter Thanks!
I've done the same set up as you but for some reason I keep getting an issue with CORS on the API.Post request. Any ideas?
same here
@@AugustineCatherine Looks like this is what you need docs.amplify.aws/lib/restapi/authz/q/platform/js#unauthenticated-requests per this issue github.com/aws-amplify/amplify-js/issues/7749
Though I'm still having an issue getting it to work with authentication in the endpoints and Cognito, might remove authentication on your endpoints until the workflow is fixed.
@@AmberCheaaa the thing is, when I run it for the first time, it works and then on it throws the CORS issue. Will try ur suggestion
@Dougie Major yes, the path was correct,that's why it worked the first time. Nothing changed, but doesn't run the next.
@Dougie Major Access to XMLHttpRequest at '**/staging/getChapterCount' from origin 'localhost:4203' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource... I have this header though..
Great video, nicely explained! But, I have a question. I don't see you add Authorization header in the API request and yet, you managed to do the CRUD operations successfully. How is that possible? I'm referring to below article. Appreciate if you could give me some points on this because, I have no luck getting my API calls success. Thanks!
docs.amplify.aws/lib/restapi/authz/q/platform/js#cognito-user-pools-authorization
Hey! When our frontend calls our endpoint with the API.get() method, it also uses the credentials found in our aws-exports file to auththenticate with our API Gateway backend. Super good observation since this is only possible because we added our API via the Amplify CLI. If we used an API Gateway that was standalone from our app, we would have to pass in the auth headers as you mentioned. Hope that helps, and thanks for checking out the video!
@@focusotter Thank you very much for your reply. I found some points to follow, in your reply. Big help! Keep on tutoring!
No context about where exactly are you and what exactly are you trying to achieve.
Dislike given.
Thanks for checking out the video!✌🏽