I have attached an EC2 role to the instance , to my EC2 instance and I am running my AWS JAVA SDK . When I am trying to load the credentials this way :
InstanceProfileCredentialsProvider instanceCred = new InstanceProfileCredentialsProvider();
I am getting 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 any suggest what problem I might be making ?
Aucun commentaire:
Enregistrer un commentaire