Running Simple Node Application on AWS EBS

Running Simple Node Application on AWS EBS


  1. Ensure you have an AWS account with Elastic Beanstalk, SQS and S3 enabled
  2. Download EB command line and install on your local computer – see link
  3. Create AWS credentials and save in a local file (~/.aws/config or Usersusername.awsconfig) as below
aws_access_key_id = key id
aws_secret_access_key = access key

Application running on Elastic Beanstalk with High availability

This deployment option gives you a multiple node Node-RED setup, with a shared filesystem using Amazon Elastic File System (EFS). Because it runs multiple nodes behind a load balancer, you will have high availability – if a node dies, Elastic Beanstalk will replace it automatically.

The infrastructure is created for you by a CloudFormation template, so you don’t need to know much about AWS to set it up.

In addition, this deployment option enables you to run Node-RED under https and to login via Auth0 (or you can easily swap to in-built auth or any Passport-compatible ID provider).

Running on AWS EC2 with Ubuntu

Create the base EC2 image

  1. Log in to the AWS EC2 console

  2. Click ‘Launch Instance’

  3. In the list of Quick Start AMIs, select Ubuntu Server

  4. Select the Instance Type –  t2.micro  is a good starting point

  5. On the ‘Configure Security Group’ tab, add a new ‘Custom TCP Rule’ for port 1880

  6. On the final ‘Review’ step, click the ‘Launch’ button

  7. The console will prompt you to configure a set of SSH keys. Select ‘Create a new key pair’ and click ‘Download key pair’. Your browser will save the  .pem  file – keep that safe. Finally, click ‘Launch’.

After a couple of minutes your EC2 instance will be running. In the console you can find your instance’s IP address.

Share this article: