1

I am using Windows 10. I have created an AWS EC2 Linux instance, following the instructions on the AWS tutorial. I have successfully connected to my instance with WinSCP, but now I don't know how to upload my app (only javascript) to the server and make it run. The tutorial only explains how to use Drupal. I do not want to use Drupal. The 3rd party explanations are specific to certain frameworks. Can some one please tell me what the next steps are to deploy my app?

Thank you.

2
  • Is your app a server-side JS app (NodeJS, for example) or is it a HTML/JavaScript website? Commented Feb 28, 2016 at 7:12
  • It is an HTML/JS app whose backend is php and DB is MySQL. For now I've just been trying to deploy the html/js without the backend.
    – user5791460
    Commented Feb 29, 2016 at 17:10

1 Answer 1

2

Amazon EC2 is a virtual machine. For your purposes, think of it as a server. This means that it does nothing except provide you with an operating system and some "disk" space. Any applications you want on it need to be installed yourself. So, if you want to spin up your own instance and run a Javascript application, you would need to install whatever applications you need (e.g. Drupal, Wordpress, Apache, etc.). For starting out, I would suggest you take a look at the various AMI's that are out there, Bitnami has created a number of them. You mentioned you DON'T want to use Drupal; would you rather use Wordpress? I'm not familiar with any of the CMS'.

https://aws.amazon.com/marketplace/pp/B007IP8BKQ

Or, Bitnami has a LAMP AMI you can use.

https://aws.amazon.com/marketplace/pp/B007IN7GJA

Another way to go is to use the Elastic Beanstalk service. Beanstalk starts up an EC2 instance for you and offers a preconfigured web-server environment that you deploy your application into, one of which is Node.js. Its documentation is available here:

https://aws.amazon.com/documentation/elastic-beanstalk/

The 3rd party link you referenced was for MEAN (Mongo, Express, Angular, Node). Are you trying to setup a MEAN application? If so, Elastic Beanstalk may not be the way to go, as there will likely be a lot of configuration to get Angular and Express setup and the configuration process is not straight forward...and so an EC2 instance may be better, at least to start out with.

If it's a simple PHP backend / Javascript frontend application, Beanstalk would be fine (just be sure that you're NOT deploying code directly to the EC2 instance that gets created as it will NOT persist indefinitely). Any changes to the website or JS code must be deployed via the Beanstalk application.

So, without knowing what environment you're looking to host your application in, it's impossible to provide any further advice, but you can start there.

If you want to provide any further information on what you're trying to do, edit your question and I can help further.

2
  • Thanks for the feedback Brooks. I decided to go the EBS route, and it is working well for me.
    – user5791460
    Commented Mar 1, 2016 at 16:40
  • Glad to hear! Remember, do NOT deploy code directly to the EC2 instance when using Beanstalk. If you do, all changes will be lost when Beanstalk redeploys to another instance. Also, please consider accepting the answer as correct, if it was indeed correct for the question asked.
    – Brooks
    Commented Mar 1, 2016 at 16:43