0

I am quite confused with Amazon Web Services, all that I want to do is to create a Node Js server on amazon and running it. Which service I should use ?

Here the list of services enter image description here

Shoud I use CloudFront ? EC2 ? Elastic Beanstalk or or other ?

Any help would be really appreciated

Doapper
  • 81
  • 9
  • All the services under the "Compute" section in that screenshot can run NodeJS. I'm voting to close this question because it is too broad and shows zero research effort. – Mark B Jun 29 '16 at 14:31

2 Answers2

2

For Node js EC2 service should be used. You have to install a software named putty configure it and run your node js script like you run on your localhost.

Here are some links to tutorials: https://www.youtube.com/watch?v=WxhFq64FQzA https://aws.amazon.com/developers/getting-started/nodejs/

To deploy files you can simply use FTP instructions given below:

Connect to Amazon EC2 file directory using Filezilla and SFTP

Community
  • 1
  • 1
Mohammed Gadiwala
  • 1,453
  • 2
  • 15
  • 26
2

I would not be so categoric as "use ec2" or "use something else" ...

well clearly on AWS if you want to deploy a node application, you have 2 main choices:

The Infrastructure as a Service (IaaS) offering from Amazon, you're free to do what you want/need and you manage your own servers.

The Platform as a Service (PaaS) offering from Amazon, aws will provide you machines, sdk versions etc you will use to build your app and you manage only your app not the servers

each comes with their pros and cons. You can read this op about some of the differences.

Basically I will sum up like this:

If you're building a 'small' web app or want to concentrate purely on your app and do not use fancy 3rd party tool/libs go with ElasticBeanstalk, you develop your app you deploy your app and it works. aws will manage the servers, you can set up rules to scale automatically, you can connect to other aws services (mainly RDS for database, SNS for mail notification ...)

If you have access to IT resources who know how to setup and manage a server (including security ...) and need to develop an app with many additional services, lib that might not be supported by aws eb or other aws services (such as setting up a mongo db, there's no out of the box offering from rds or other so you will need to install on ec2 server or user another 3rd party services which provides this)

The topic is not to discuss all aws offering but just to complete on your question, cloud front is the CDN system of AWS so if you use a lot of static assets (JS, css, images ...) you should look into it, wether you use S3, eb or ec2 to deploy your app you will be able to use this service. It speeds up the delivery of static assets to your users by caching them on edge location closed to those users.

Community
  • 1
  • 1
Frederic Henri
  • 45,144
  • 6
  • 98
  • 119
  • Brillant answer, thank you very much! But when I created elasticbeanstalk for NodeJs, a new instance has been created on EC2. I still can connect with SSH to this instance ? – Doapper Jun 29 '16 at 13:37
  • yes, you will need [ec2 key pair](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) – Frederic Henri Jun 29 '16 at 14:02