Created
February 1, 2013 07:31
-
-
Save abh1nav/4689919 to your computer and use it in GitHub Desktop.
Load AWS credentials from a resource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Util { | |
public static PropertiesCredentials getAwsCredentials() { | |
PropertiesCredentials creds = null; | |
try { | |
creds = new PropertiesCredentials( | |
Util.class.getResourceAsStream( | |
"/AwsCredentials.properties")); | |
} | |
catch(Exception e) { | |
throw new RuntimeException("Could not load AwsCredentials", e); | |
} | |
return creds; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment