code: public Instance getInstance() {
          DescribeInstancesRequest req = new DescribeInstancesRequest();
          req.setInstanceIds(Collections.singleton(this.getInstanceId()));
          DescribeInstancesResult result = this.ec2Client.describeInstances(req);
          if (result.getReservations().size() != 1) {
              throw new IllegalStateException("Found multiple instances");
          }
          List<Instance> instances = result.getReservations().get(0).getInstances();
          if (instances.size() != 1) {
              throw new IllegalStateException("Found multiple instances");
          }
          return instances.get(0);
      }
docs: <br>
  Needed AWS actions:
  <ul>
  <li>ec2:DescribeInstances</li>
  </ul>
  
  @return the current EC2 instance