java - Unable to load AWS credentials from the /AwsCredentials.properties file on the classpath -


using code setting class path

awscredentialsprovider credentialsprovider = new classpathpropertiesfilecredentialsprovider(); ec2 = new amazonec2client(credentialsprovider); 

below format awscredentials.properties file

# fill in aws access key id , secret access key # http://aws.amazon.com/security-credentials accesskey = keyhere secretkey = secretkeyhere 

below exception getting

exception in thread "main" com.amazonaws.amazonclientexception: unable load aws credentials /awscredentials.properties file on classpath      @ com.amazonaws.auth.classpathpropertiesfilecredentialsprovider.getcredentials(classpathpropertiesfilecredentialsprovider.java:81)     @ com.amazonaws.services.ec2.amazonec2client.invoke(amazonec2client.java:8359) 

you getting exception because aws sdk unable load credentials. should goto preferences goto aws , add secret key , access key. project can retrieve both keys.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -