I have bound the EC2 role to the instance, to my EC2 instance, and I am running my AWS JAVA SDK. When I try to load credentials this way:
InstanceProfileCredentialsProvider instanceCred = new InstanceProfileCredentialsProvider();
I get the following error:
Exception in thread "main" com.amazonaws.AmazonClientException: Unable to load credentials.
at com.amazonaws.auth.InstanceProfileCredentialsProvider.loadCredentials(InstanceProfileCredentialsProvider.java:195)
at com.amazonaws.auth.InstanceProfileCredentialsProvider.getCredentials(InstanceProfileCredentialsProvider.java:124)
Can I assume that I can lose?
source
share