How can I check which platform my app runs, AWS EC2 instance, Azure Role instance and non-cloud system? now I do that like this:
if(isAzure()) { //run in
On ec2 Ubuntu instances, the file /sys/hypervisor/uuid exists and its first three characters are 'ec2'. I like using this because it doesn't rely on external servers.
/sys/hypervisor/uuid