I am trying to provide credentials for my Spring boot maven application hosted in the cloud (Pivotal Web Services) to download it on Amazon S3. However, every time I try to get credentials using:
DefaultAWSCredentialsProviderChain credentialProviderChain = new DefaultAWSCredentialsProviderChain();
TransferManager transferManager = new TransferManager(credentialProviderChain.getCredentials());
It says
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception
[Request processing failed; nested exception is com.amazonaws.AmazonClientException: Unable
to load AWS credentials from any provider in the chain] with root cause
2016-01-28T23:55:38.55+0000 [APP/0] OUT com.amazonaws.AmazonClientException:
Unable to load AWS credentials from any provider in the chain
I am a bit confused as to whether my credentials should be defined in the beans.xml or application.properties file. But I tried to do without results. Can someone point me in the right direction?
source
share