is-ec2
Sometimes you need to know if you are running on EC2 or not. This will tell you.
npm install is-ec2
var isec2 = ; if console;
This works by executing the following command:
Only work on Linux EC2 instances, not Windows. See this StackOverflow article for details.