From Zero to Serverless: MongoDB Atlas and Serverless Framework API Tutorial! 🔧💡
HTML-код
- Опубликовано: 6 авг 2022
- In this video, we will implement Serverless API using Serverless framework with Mongo DB atlas as database. We will be using Mongoose to interact with the database with project structure and Pre hook to hash the password etc.
Github Repository: github.com/imdurgadas/serverl...
Mongoose with AWS Lambda: mongoosejs.com/docs/lambda.html
Notice:
Serverless and MongoDB are trademarks or registered trademarks of Serverless and MongoDB org respectively. This video is not accredited, certified, affiliated with, nor endorsed by the community.
#serverless #lambda #aws #framework #mongodb #atlas #mongoose #tutorials #learn #technology #upksill #careers #developers Наука
tq for giving valuable knowledge on AWS lambda functions and mongoose its a great tutorial for beginners. tq very much.
Thank you for the kind words !!
Really helpful brother! 👍
Thank you for your efforts👍Great tutorial.
Thanks for this video pham. Helped me alot
Fantastic and thanks.
Thanks alot brother for the detailed explanation. It was really helpful to get started and hang around with Serverless framework and AWS.
Can you please guide me how to set up a production level network design between the mongodb server and the AWS lambda serverless instance, instead of just setting '0.0.0.0/0' at mongodb network access list?
Super cool and great tutorial 🎉 thanks man for this stuff
Glad, you liked it !
OMG! You really helped me to solve an Validation shcema error in mongoose! tThank you so much! Continune creating this value video please!
Great, thanks for all the support !
Move the database connection part out from of your lambda handler, so your connection reused and shared between lambda invocations.
Thanks for the sharing the videos🙂
You are welcome :-)
It was amazing!
Very nice tutorial.. keep making videos
Thanks for the support.
10/10, thxvm
Thank you !
Can you explain how to use middleware in this configuration? It is also a great help to learners.
I have seen some lamda APIs in our project it has X-API-KEY, but in your video there's no X-API-KEY
Hi Sai, It's upto implementation on how we want to authenticate our APIs. Some projects use Basic Auth, some use header for key , secret and so. In the video, I am showing an example on how we can add authentication but you need to tweak it as per your need.
@@durgadaskamath ok, thanks
I follow the same procedure but when it get deployed it shows me internal server error again and again but it is working fine in the local system
Go to Cloud Watch, log group and see the logs. You should see the error trace there.
@@durgadaskamath i went there it shows me some syntax error for using some unwanted dots(.) symbol but i haven''t used it in the program.
Is your code pushed to some repository ? Can you paste the screenshot of the logs as well
Thanks everything is working fine
im using amazon aws free tier will i got charged if i deploy this project , even someone dont use the api
, im new in aws
You should not get charged if you deploy the above as they are all serverless and have a graceful limit. Ensure to use it with care and not to provision any large services.
If you are a beginer, i would suggest you to set a "Budget alert" in AWS at 0.01 cent so that by any chance , you hit it - you will be notified.
@@durgadaskamath thanks for the guidance
excellent video! thank you. I just have one question. when I run the getAll.js function, I get the following error
{
"statusCode": 500,
"body": "{\"error\":\"Cannot read properties of undefined (reading 'Promise')\"}"
}
Can you please help me with this? @durgadas
Do you have your code on github? If yes, provide me the link.
Ensure that you have await on the functions that return promise , if not then further code accessing the object may not yield a value.
@@durgadaskamath Thank you so much. There was an issue with the return promise and once I fixed that, this worked extremely well. Also, would it be possible to make a similar video on connecting AWS Glue to MongoDB Atlas?
@@prasannasundarajan837 Sure. Will add to my list.