code: @Override
  	public String retrievePublicIpAddress( TargetHandlerParameters parameters, String machineId )
  	throws TargetException {
  
  		String result = null;
  		try {
  			AmazonEC2 ec2 = createEc2Client( parameters.getTargetProperties());
  			DescribeInstancesRequest dis = new DescribeInstancesRequest();
  			dis.setInstanceIds(Collections.singletonList(machineId));
  
  			DescribeInstancesResult disresult = ec2.describeInstances( dis );
  			if( ! disresult.getReservations().isEmpty()) {
  				// Only one instance should match this machine ID
  				result = disresult.getReservations().get( 0 ).getInstances().get( 0 ).getPublicIpAddress();
  			}
  
  		} catch( AmazonServiceException e ) {
  			// nothing, the instance does not exist
  
  		} catch( Exception e ) {
  			this.logger.severe( "An error occurred while retrieving a public IP address from Amazon EC2. " + e.getMessage());
  			throw new TargetException( e );
  		}
  
  		return result;
  	}
docs: /*
  (non-Javadoc)
  @see net.roboconf.target.api.TargetHandler
  #retrievePublicIpAddress(net.roboconf.target.api.TargetHandlerParameters, java.lang.String)