What are the steps for deploying a Node js app, with express.js framework and MongoDB as database on AWS? This is my first such activity and I am not able to find any reliable source over the net.
Asked
Active
Viewed 1.6k times
17
-
First thing you should know is how AWS EC2 works (Talking about ubuntu OS / Linux). This link would help you to install node.js https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-14-04 For mongoDB https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-14-04 – Crazy Engineer Nov 01 '16 at 17:11
-
I am working on a windows machine.Would this still be helpful? – Nimit Bedi Nov 01 '16 at 17:17
-
1No It is for Linux only. For windows server everything is already defined on their websites for Mongo DB (https://docs.mongodb.com/v3.0/tutorial/install-mongodb-on-windows/) Personally I wont suggest Windows Server because its really a pain. I would suggest to work on Linux server – Crazy Engineer Nov 01 '16 at 17:23
2 Answers
10
Deploy nodejs-express-mongoDB
backend on AWS EC2 Ubuntu(16.04)
Back-end is a private repo on Gitlab.
Steps: 1: Create EC2 Ubuntu server on AWS,
2: Connect personal computer with AWS server - use to control cloud Ubuntu server on personal computer,
Connecting Linux Instance from Windows Using PuTTY
3: Clone repo from Gitlab to Ubuntu server,
Configure ssh key on linux server
Clone gitlab repo to linux server
4: Install Nodejs and MongoDB on Ubuntu server,
5: Launch MongoDB and run Nodejs to start node server,
6: Test back-end server using Postman or Browser.
Other useful linkYouTube

Xianwei
- 2,381
- 2
- 22
- 26
-
This is a very basic setup - just launch a server image and ssh into it and do the setup. Do you know if there's a CloudFormation template or something similar ready for a basic but scalable configuration? – boldnik May 31 '19 at 14:14
6
AWS has a full documentation for this on their website. These documentations are extremely thorough and you should read these first.

Shruggie
- 869
- 6
- 20
-
I have to admit that these docs are poorly explaining some failures a developer may encounter during the step-by-step configuration and if he want to, for example, create another S3 bucket name for same stack. It requires not a single day to actually learn how to use CloudFormation... But unfortunately I can't advise anything better. MongoDB team (Atlas etc) and AWS are now in hot competition since DocumentDB was introduced. – boldnik May 31 '19 at 14:12