static boolean shouldRefresh(AwsTemporaryCredentials credentials) {
        Instant expiration = Optional.ofNullable(credentials).map(AwsTemporaryCredentials::expiration).orElse(Instant.EPOCH);
        return Duration.between(Instant.now(), expiration).toMinutes() < MIN_EXPIRY.toMinutes();
    }
Requests temporary credentials from ZTS or return cached credentials
vespa-athenz/src/main/java/com/yahoo/vespa/athenz/aws/AwsCredentials.java