AWS Official Blog

AWS Elastic Beanstalk for Node.js

by Jeff Barr | on | in Amazon EC2, AWS Elastic Beanstalk, Developer Tools | | Comments

Im 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;