use of com.amazonaws.auth.AWSSessionCredentials in project druid by druid-io.
the class FileSessionCredentialsProvider method refresh.
@Override
public void refresh() {
try {
Properties props = new Properties();
try (InputStream is = Files.newInputStream(Paths.get(sessionCredentialsFile))) {
props.load(is);
}
String sessionToken = props.getProperty("sessionToken");
String accessKey = props.getProperty("accessKey");
String secretKey = props.getProperty("secretKey");
awsSessionCredentials = new Credentials(sessionToken, accessKey, secretKey);
} catch (IOException e) {
throw new RuntimeException("cannot refresh AWS credentials", e);
}
}
Aggregations