public boolean isValid(Resource resource) {
Validate.notNull(resource);
if (!"LAUNCH_CONFIG".equals(resource.getResourceType().name())) {
return true;
}
AWSResource lcResource = (AWSResource) resource;
String usedByASG = lcResource.getAdditionalField(LaunchConfigJanitorCrawler.LAUNCH_CONFIG_FIELD_USED_BY_ASG);
if (StringUtils.isNotEmpty(usedByASG) && !Boolean.parseBoolean(usedByASG)) {
if (resource.getLaunchTime() == null) {
LOGGER.error(String.format("The launch config %s has no creation time.", resource.getId()));
return true;
} else {