0

I am trying to deploy a node.js application on AWS on an existing EC2 instance. Steps http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs.sdlc.html describes to deploy on newly created elastic beanstalk instance. How can I reconfigure to add my existing EC2 instance to deploy code on? Or the entire purpose of elastic beanstalk, it to deploy on newly created EB environment?

1
  • You can configure your own environment with an AMI. Not sure if you can make EB deploy to a running E2 instance though. Mainly because EB adds in autoscaling and such, for which it needs to be configured prior with an AMI or default env Commented Mar 5, 2014 at 21:08

1 Answer 1

1

Elastic Beanstalk deployment is very specific to the service.

You can conceivable hack the eb scripts to make it work for your EC2 instance. You can look at the AWSDevTools/aws.elasticbeanstalk.push file that the eb command creates under the .git directory. It's essentially a Ruby script that does the git push.

You can could also look at the eb script and libraries themselves which are essentially written in Python.

Nevertheless, I recommend to stick to just a plain node.js deployment model that has been answered here on SO on some other posts and Internet blogs. For example: How do I run a Node.js application as its own process?

You can also take a look at this blog too (which is referred from the previous SO post)

http://clock.co.uk/tech-blogs/deploying-nodejs-apps

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.