Menu
AWS Elastic Beanstalk
Developer Guide (API Version 2010-12-01)

Getting Started with Node.js on Elastic Beanstalk

To get started with Node.js applications on AWS Elastic Beanstalk, all you need is an application source bundle to upload as your first application version and to deploy to an environment. When you create an environment, Elastic Beanstalk allocates all of the AWS resources needed to run a highly scalable web application.

Launching an Environment with a Sample Node.js Application

Elastic Beanstalk provides single page sample applications for each platform as well as more complex examples that show the use of additional AWS resources such as Amazon RDS and language or platform-specific features and APIs.

Samples

Supported Configurations

Environment Type

Source Bundle

Description

Node.js

Web Server

nodejs-v1.zip

Single page express application.

Node.js

Web Server with Amazon RDS

nodejs-express-hiking-v1.zip

Hiking log application that uses the Express framework and an RDS database.

Tutorial

Node.js

Web Server with DynamoDB, Amazon SNS and Amazon SQS

eb-node-express-sample-v1.0.zip

Clone the repo at GitHub.com

Express web site that collects user contact information for a new company's marketing campaign. Uses the AWS SDK for JavaScript in Node.js to write entries to a DynamoDB table, and Elastic Beanstalk configuration files to create resources in DynamoDB, Amazon SNS and Amazon SQS.

Tutorial

Download any of the sample applications and deploy it to Elastic Beanstalk by following these steps:

To launch an environment with a sample application (console)

  1. Open the Elastic Beanstalk console.

  2. Choose an application or create a new one.

  3. In the upper right corner, choose Create New Environment from the Actions menu.

  4. Choose between Web server and Worker environment tiers. You cannot change an environment's tier after creation.

    Note

    The .NET on Windows Server platform doesn't support the worker environment tier.

  5. For Platform, choose the platform that matches the language used by your application.

    Note

    Elastic Beanstalk supports multiple configurations for most platforms listed. By default, the console selects the latest version of the language, web container or framework supported by Elastic Beanstalk. If your application requires an older version, choose Configure more options below.

  6. For App code, choose Sample application.

  7. If you would like to further customize your environment, choose Configure more options. The following options can only be set during environment creation:

    • Environment name

    • Domain name

    • Platform configuration

    • VPC

    • Tier

    The following settings can be changed after environment creation, but require new instances or other resources to be provisioned and can take a long time to apply:

    • Instance type, root volume, key pair, and IAM role

    • Internal RDS database

    • Load balancer

    For details on all available settings, see The Create New Environment Wizard.

  8. Choose Create environment.

Next Steps

After you have an environment running an application, you can deploy a new version of the application or a completely different application at any time. Deploying a new application version is very quick because it doesn't require provisioning or restarting EC2 instances.

After you've deployed a sample application or two and are ready to start developing and running Node.js applications locally, see the next section to set up a Node.js development environment with all of the tools that you will need.