Deploy NodeJS Express API as AWS Lambda Function in 15 minutes
HTML-код
- Опубликовано: 25 мар 2021
- ❗️Connecting your frontend to your backend is often the hardest concepts to grasp when you start developing web apps. Today we will deploy and NodeJS Express API using AWS Lambda that connects the front and back end in 15 minutes.
🧠 Knowing how to set up an API opens up a world of possibility when developing web applications
Amplify Docs: docs.amplify.aws/start/q/inte...
---
WHO AM I: I'm Dylan, a Cloud Engineer living in Bend, Oregon. I use my background in tech to make videos about technology that enables and grows businesses.
---
🌍 My website / blog -
dylanalbertazzi.com/ Наука
Love you bro, this tutorial completed my understanding of amplify as a frame from a rest perspective. This was exactly what I've been looking for! Thanks
You're very welcome!
I really appreciate you taking the time to create this video. I watched it three times and tried to follow along, but I could not replicate the results.
I'm glad to help! Where are you getting stuck?
Because you need to install amplify globally
Such detailed explanation, good video quality, good thumbnail. I wonder why you haven't blown up. Keep up the grear work man. Thanks for the video
Ahem. So. I've been using AWS since 2010. For well over a year now, I've been using Azure Function Apps, specifically w/Node, to great success. Time warp to May 2022. I want to replicate my Azure successes in AWS w/Amplify. I find this video. I have the experience to be able to pick and choose what I want out of the video, but, there are some areas where I really need to pay attention, to learn the AWS concepts I already am familiar with in Azure. This is where the rapid pace of this video breaks down, leaving a confused, jumbled mess of "WHAT NOW?!?!". Dylan, great vids, man. I dig your content. It's good. But a little more production value, if you please. Your exuberance, and comfort with these tools, is leaving some of us in the dust. Slow down. Complete a thought, and a workflow process before going on to the next one. Having to pause, and rewind, and watch a 10 second section over and over again is killing me. Take the time to edit out mistakes. For example, at 13:30~ in this video, I see a Terminal widow with "?Press enter to continue". You never completed that step. What comes after that step is pretty darned important. Instead, you pop straight into your React stuffs. Thanks for the videos, really. It's making for a reasonably smooth transition for me, an experienced dev, but those who aren't familiar with these concepts are likely getting bogged down. I can see as much from other concepts.
Thanks for the input, I'll take it into consideration.
For Mac users save yourself from banging your head against a wall and go for the universal install of amplify and avoid the scanning plugin errors.
same for windows
Lots of knowledge gained! Thanks again for this video Dylan
I'm so glad you came away with something! Feel free to reach out if there's something else you want to learn.
Thanks! This is my first time doing serverless functions!
Glad I could help!
it worked! thanks for sharing!
quick question is it possble to run the amplify server locally while testing?
Awesome video
Great 👍
Thanks
Hi , Please make shorts or 10 min videos on aws major services
Like a brushing up concepts or some sort
This is first time I heard abt amplify and am already confident - thank you for tutorial
I'm glad it was helpful! I'll keep shorts in mind.
Awsome video, this really simplified one of my projects. Question though, does the lambda functions inside our amplify project still have a size limit? For instance, I want to use Puppeteer, chromium, and a few other packages inside the lambda function but this would exceed the 50mb limit lambda has. If not or even if you can...what is a work around or another good architecturally sound option when running into situations like this?
Yep, all limits still apply. Amplify is just provisioning resources and the same ol lambda is under the hood.
If you're running into size limits check out Lambda Layers. There's probably a prebuilt one for Puppeteer and chromium.
Hi Dylan, thanks for this tutorial. It was explained well and I was able to get up and running! I wanted to know the advantages of using Lamdba over using Express/NodeJS and Nodemon. To me, it seems like a complicated set-up that's not particularly easy to develop as you have to push your Lambda code each time and that's not to mention the issues with development/staging/production environments - although I'm yet to delve deeper into this.
Hey Dan,
The big advantage of lambda is scalability. Once your code is in the cloud it can be called from anywhere at anytime (almost) infinitely.
Express/NodeJS and Nodemon is great for developing locally and if your project is just for yourself is a simpler option to set up.
Cool! Thank you
You're welcome!
Perfect bro. Nice handson.
Thanks for watching!
great, more like this please
You got it!
Very nice video you are like the ben awad of aws
I wish
why is this like 15 fps
What diagram creator are you using in the beginning?
Lucid chart!
Hey do you think I can use this to make sure all my products are priced correctly on third party apps.
Possibly... it depends
How to use aws-amplify with vanilla js ... without any frontend framework?
At that point I'd recommend serverless framework www.serverless.com/
Amplify really shines on the frontend.
Awsome
Hey man, How long did it take you to learn NodeJS & Express APi?
It's a continual process and something I'm learning more about every day!
However I learned Node and Express after I'd been coding for a few years already. With that prior experience it was a couple weeks until I had a base understanding.
Keep putting practice in EVERY DAY and you'll be astounded at where you're at in a year.
@@dylanalbertazzi You're right, I have started my cloud journey. Currently learning Python.
Anyone else getting a post 400 error?
subbed but can you also do it without amplify?
Absolutely, nowadays I would opt for Serverless Framework instead.
How we can connect mongodb in this app?
12:12 he mentions where you would add the code that connects to your db. So in the amplify/backend/function/myLamAPIFunc/src/app.js, (after you install mongoose driver or the mongodb native driver), you would import (require) it into your app, add your db string + credentials, and call whatever db resource/query from within the GET or POST block, and you could even post-process the data there before sending it back to the front end user in the res object.
@@jonrhaider It's solved. thanks :-)
Thanks for giving some feedback!
Any disadvantage about handling all my Rest API with only one lamba function?
Maintainability as it grows is a drawback. Definitely not the architecture for anything more than a few functions.
@@dylanalbertazzi Do you mind to share me some suggestions to build a scalable and maintaneable backend with pure amplify and serverless functions?
6:41 Baby sound?
Hi,man.Is it free or you need subscription for a year?
AWS has a generous free tier that you shouldn't use up if you're playing around.
You didnt prepare your stuff ...
Thanks for the easy to follow video. I am having an issue I cannot figure out. Whenever fetchWooHoos() gets called I get a function does not exist error. I have confirmed the names are the same and the function did get pushed and is showing on the aws console. Any thoughts?
Hey,
It's tough to say without seeing the code, my first thought is that that your backend-config.json isn't set up properly