title: How can we determine if we are running in EC2 or Fargate?
body: <p>I have a Java service running tasks on both AWS EC2 and Fargate. Is there a way to determine if we are running in EC2 or Fargate programatically by using the AWS libraries or otherwise ?</p>