presto-kinesis/src/main/java/io/prestosql/plugin/kinesis/s3config/S3TableConfigClient.java/S3TableConfigClient/updateTablesFromS3
class S3TableConfigClient:    private void updateTablesFromS3()
    {
        long now = System.currentTimeMillis();

        AmazonS3Client s3client = clientManager.getS3Client();

        for (S3ObjectSummary summary : getObjectSummaries()) {
            if (!descriptors.containsKey(summary.getKey()) || summary.getLastModified().getTime() >= lastCheck) {
                // New or updated file, so we must read from AWS
                if (summary.getKey().endsWith("/")) {
                    continue;
                }

                log.info("Getting : %s - %s", summary.getBucketName(), summary.getKey());
                S3Object object = s3client.getObject(new GetObjectRequest(summary.getBucketName(), summary.getKey()));

                try (BufferedReader reader = new BufferedReader(new InputStreamReader(object.getObjectContent(), UTF_8))) {
                    KinesisStreamDescription table = streamDescriptionCodec.fromJson(CharStreams.toString(reader));
                    descriptors.put(summary.getKey(), table);
                    log.info("Put table description into the map from %s", summary.getKey());
                }
                catch (IOException iox) {
                    log.error("Problem reading input stream from object.", iox);
                    throwIfUnchecked(iox);
                    throw new RuntimeException(iox);
                }
            }
        }

        log.info("Completed updating table definitions from S3.");
        lastCheck = now;
    }