class EC2RaiderImpl implements EC2Raider {

    @Override
    public void attachSecurityGroup(String instanceId, String securityGroup) {

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

        List<String> securityGroups = this.getSecurityGroups(instanceId);

        if (securityGroups != null && !securityGroups.contains(securityGroup)) {
            securityGroups.add(securityGroup);
            ec2Delegator.getEc2().modifyInstanceAttribute(new ModifyInstanceAttributeRequest().withInstanceId(instanceId).withGroups(securityGroups));
        }


    }

    public  EC2RaiderImpl();

}