I’m happy to be able to tell you that AWS Elastic Beanstalk now supports Node.js applications. You can now build event-driven Node.js applications and then use Elastic Beanstalk to deploy and manage them on AWS.
Elastic Beanstalk automatically configures the environment and resources using sensible defaults in order to run your Node.js application. You can focus on writing your application and let Elastic Beanstalk run it and scale it automatically.
Elastic Beanstalk for Node.js includes a bunch of features that are specific to the Node.js environment. Here are some of my favorites:
- Choose Nginx or Apache as the reverse proxy to your Node.js application. You can even choose to not use any proxy if your application requires that the client establishes a direct connection.
- Configure HTTP and TCP load balancing depending on what your application needs. If your application uses WebSockets, then TCP load balancing might be more appropriate for your workload.
- Configure the Node.js stack by using the specific version of Node.js that your application needs or by providing the command that is used to launch your Node.js application. You can also manage dependencies using npm.
- Help improve performance by configuring gzip compression and static files when using Nginx or Apache. With gzip compression, you can reduce the size of your response to the client to help create faster transfer speeds. With static files, you can let Nginx or Apache quickly serve your static assets (such as images or CSS) without having these requests take time away from the data-intensive processing that your Node.js application might be performing.
- Seamlessly integrate your app with Amazon RDS to store and retrieve data from a relational data store.
- Customize your EC2 instances or connect your app to AWS resources using Elastic Beanstalk configuration files (visit the AWS Elastic Beanstalk Developer Guide to learn more about configuration files).
- Run your Node.js application inside an Amazon Virtual Private Cloud for additional networking control.
To get started, simply create a new Elastic Beanstalk application and select the Node platform:
You can configure all of the options for your Node.js environment from within Elastic Beanstalk:
To learn more about Elastic Beanstalk for Node.js, visit the AWS Elastic Beanstalk Developer Guide. The documentation also includes step-by-step guides for using the Express and Geddy frameworks with Elastic Beanstalk.
-- Jeff;


That's awesome!
When we'll be available to choose between Apache and Nginx for PHP applications in Beanstalk?
Posted by: Guillermo | March 12, 2013 at 05:01 AM
Can we deploy railwayJS applications on the EB for Node.js too? That would be really cool and something I am looking forward to.
Posted by: Ritesh Gupta | March 12, 2013 at 08:01 PM
Ritesh, I spoke with the Product Manager and this is what he told me:
> Yes, RailwayJS is built on top of Express and should work with Elastic Beanstalk. They can follow steps similar to the Express walkthrough to get it setup:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_express.html
Posted by: Jeff Barr | March 13, 2013 at 08:49 PM
Hi Jeff,
Thanks a heap, firstly for the follow up and also for the information. This is good information.
Forgot to mention in the first comment, and I should have: Excellent article, thanks a lot!
Looking forward to working with Amazon EB.
Regards,
Ritesh
Posted by: Ritesh Gupta | March 13, 2013 at 10:53 PM
I tried deploying a websockets node.js app, but i kept getting a 502 gateway error. The websockets request seem to never reach the node.js backend. But when I tried a non-websocket node.js app, everything is fine. Can you confirm that currently the elastic beanstalk doesn't support websocket node.js apps?
Posted by: James Lukanta | April 10, 2013 at 04:30 AM