1

i am getting the below error while creating an instance in AWS through eclipse.

exception in thread "main" com.amazonaws.AmazonClientException: Unable to load AWS credentials from any provider in the chain
    at com.amazonaws.auth.AWSCredentialsProviderChain.getCredentials(AWSCredentialsProviderChain.java:117)
    at com.amazonaws.services.opsworks.AWSOpsWorksClient.invoke(AWSOpsWorksClient.java:3574)
    at com.amazonaws.services.opsworks.AWSOpsWorksClient.createInstance(AWSOpsWorksClient.java:2098)
    at AwsConsoleApp.main(AwsConsoleApp.java:154)

my code reads:

String az=new String("ec2.us-east-1.amazonaws.com");
cir.setAvailabilityZone(az);
String ami_id=new String("ami-864d84ee");
cir.setAmiId(ami_id);
CreateInstanceResult cr=awoc.createInstance(cir);

please hep me on this.

1

1 Answer 1

0

Looks like you need to provide your credentials to access your AWS account:

http://docs.aws.amazon.com/AWSSdkDocsJava/latest/DeveloperGuide/credentials.html

Sign up to request clarification or add additional context in comments.

2 Comments

What if I want to access amazon resource anonymously which is public available? How to provide "anonymous" credentials?
I don't understand what you mean. You should ask a new question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.