AWSCredentials awsCredentials = null;
InputStream credentialsFile = getClass().getClassLoader().getResourceAsStream("AwsCredentials.properties");
if (credentialsFile != null) {
logger.info("Loading credentials from AwsCredentials.properties");
try {
awsCredentials = new PropertiesCredentials(credentialsFile);
} catch (IOException e) {
throw new PersistenceException("Failed loading credentials from AwsCredentials.properties.", e);
}
} else {
logger.info("Loading credentials from simplejpa.properties");