Running Simple Node Application on AWS EBS
- Ensure you have an AWS account with Elastic Beanstalk, SQS and S3 enabled
- Download EB command line and install on your local computer – see link
- 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
Log in to the AWS EC2 console
Click ‘Launch Instance’
In the list of Quick Start AMIs, select Ubuntu Server
Select the Instance Type –
t2.microis a good starting point
On the ‘Configure Security Group’ tab, add a new ‘Custom TCP Rule’ for port 1880
On the final ‘Review’ step, click the ‘Launch’ button
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
.pemfile – 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.