Node-RED flows for Amazon Web Services
Welcome back everybody to my blog ! what were we talking about last time ? 🙂
Pretty sure that we were talking about Azure Platform and Node-RED, well now I’m starting to explore the Amazon Web Services platform (AWS), I’m having so much fun with node-RED for this reason I wanna to test node-RED on Amazon cloud and I would like to create a first flow using Weather Company APIs.
First step is necessary to create an AWS account, I created an AWS Free Tier, the free account is designed to enable you to get hands-on experience with AWS Cloud Services. The AWS Free Tier includes services with a free tier available for 12 months following your AWS sign-up date, as well as additional service offers that do not automatically expire at the end of your 12 month AWS Free Tier term. You have to provide you credit card as a form of identity validation and verification.
First step: Create a virtual machine
Log in to the AWS console:
click to add a new Elastic Compute Cloud (EC2) virtual machine and select Ubuntu Server.
with the free account you can start just with a minimal machine. I created a Security Group to add a new inbound rule to access Node-RED TCP port and a set of SSH keys to access by ssh service.
Second Step: install Node-RED
Log in AWS virtual machine, install Node-RED and Watson nodes by the same steps used for Azure virtual machine.
| => ssh -i "mnoioso.pem" [email protected] Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-92-generic x86_64) ubuntu@ip-172-31-16-166:~$ node-red Welcome to Node-RED =================== 2 Sep 15:37:11 - [info] Node-RED version: v0.14.6 2 Sep 15:37:11 - [info] Node.js version: v4.5.0 2 Sep 15:37:11 - [info] Linux 3.13.0-92-generic x64 LE
AWS node-RED flow
For my first scenario I used the Weather Company service on Bluemix
and the Weather Company rest API to get the current temperature in a specific location:
Here is the end to end scenario, I created a new service to use IBM Insights for Weather to integrate historical and real-time weather data from The Weather Company into my application, I tested the current condition observation API by this flow :
the API is invoked any minute with the Rome’s coordinate, the current condition is displayed on debug window.
Thanks for reading.