class RdsLookupService {

    public Optional<GatekeeperRDSInstance> getOneInstance(AWSEnvironment environment, String dbInstanceIdentifier, String instanceName) {
        logger.info(dbInstanceIdentifier);
        Long startTime = System.currentTimeMillis();
        List<String> securityGroupIds = sgLookupService.fetchSgsForAccountRegion(environment);
        AmazonRDSClient amazonRDSClient = awsSessionService.getRDSSession(environment);
        List<GatekeeperRDSInstance> gatekeeperRDSInstances;

        //if it's an aurora cluster, the resrouce will start with "cluster"
        if(dbInstanceIdentifier.startsWith("cluster")){
            DescribeDBClustersResult result = amazonRDSClient.describeDBClusters(
                    new DescribeDBClustersRequest().withDBClusterIdentifier(instanceName));
            gatekeeperRDSInstances = loadToGatekeeperRDSInstanceAurora(environment, amazonRDSClient, result.getDBClusters(), securityGroupIds, DatabaseType.AURORA_REGIONAL);
        }else {
            DescribeDBInstancesResult result = amazonRDSClient.describeDBInstances(new DescribeDBInstancesRequest().withDBInstanceIdentifier(instanceName));
            gatekeeperRDSInstances = loadToGatekeeperRDSInstance(environment, amazonRDSClient, result.getDBInstances(), securityGroupIds);
        }

        logger.info("Fetched Instance in " + ((double)(System.currentTimeMillis() - startTime) / 1000) + " Seconds");

        Optional<GatekeeperRDSInstance> gatekeeperRDSInstance = Optional.of(gatekeeperRDSInstances.get(0));
        return gatekeeperRDSInstance;
    }

    @Autowired public  RdsLookupService(AwsSessionService awsSessionService,
                            DatabaseConnectionService databaseConnectionService,
                            SGLookupService sgLookupService,
                            GatekeeperProperties gatekeeperProperties);

}