List of usage examples for com.amazonaws.auth InstanceProfileCredentialsProvider refresh
@Override public void refresh()
From source file:com.erudika.para.utils.Config.java
License:Apache License
private static String[] getAwsCredentials() { InstanceProfileCredentialsProvider ipcp = new InstanceProfileCredentialsProvider(); try {// w w w. ja va 2 s.c o m ipcp.refresh(); return new String[] { ipcp.getCredentials().getAWSAccessKeyId(), ipcp.getCredentials().getAWSSecretKey() }; } catch (Exception e) { return new String[] { "", "" }; } }