class EC2RaiderImpl implements EC2Raider {

    @Deprecated
    public List<EC2InstanceTO> getInstancesForAZ(String tag, String availabilityZoneName) {

        if (tag.isEmpty() || tag == null) {
            throw new InvalidInputDataException("Empty/Null tag provided in request");
        } else if (availabilityZoneName.isEmpty() || availabilityZoneName == null) {
            throw new InvalidInputDataException("Empty/Null availabilityZoneName provided in request");
        }

        DescribeInstancesRequest request = new DescribeInstancesRequest();

        ArrayList<String> tags = new ArrayList<>();
        tags.add(tag);

        Filter filter1 = new Filter("tag:Name", tags);

        List<String> result =
                ec2Delegator.getEc2().describeInstances(request.withFilters(filter1))
                        .getReservations()
                        .stream()
                        .map(Reservation::getInstances)
                        .flatMap(l -> l.stream())
                        .collect(Collectors.toList())
                        .stream()
                        .filter(x -> x.getPlacement().getAvailabilityZone().equalsIgnoreCase(availabilityZoneName) && x.getState().getName().equalsIgnoreCase("running"))
                        .map(Instance::getInstanceId)
                        .collect(Collectors.toList());


        if (result.isEmpty()) {
            throw new ResourceNotFoundException("Unable to find EC2 instances for tag: " + tag + " with AZ: " + availabilityZoneName);
        }

        List<EC2InstanceTO> list = getEC2InstancesByIds(result);
        Collections.shuffle(list);
        return list;

    }

    public  EC2RaiderImpl();

}