Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in AWS by (5.6k points)

I'm trying to access my S3 bucket from my java application, I have added the lib/aws-java-sdk-1.8.6.jar to my lib folder and added the dependency in my pom.xml as well.

But I'm getting this import error:

"The import com.amazonaws.services.s3.AmazonS3ClientBuilder cannot be resolved" for "import com.amazonaws.services.s3.AmazonS3ClientBuilder;"

Whereas the imports

"import com.amazonaws.services.s3.AmazonS3;" and "import com.amazonaws.services.s3.model.Bucket;"

  gave no errors.

Any help would be appreciated. 

1 Answer

0 votes
by (12.4k points)

The dependency as mentioned in Amazon documentation did not work. The path to the dependency does not exist, in Maven central repository.

"software.amazon.awssdk" % "aws-java-sdk" % "2.0.0"

This also did not resolve com.amazonaws.services.s3.AmazonS3ClientBuilder, though the JAR path is correct in Maven central -

"software.amazon.awssdk" % "aws-sdk-java" % "2.1.3"

Then I tried this and it was working.

"com.amazonaws" % "aws-java-sdk" % "1.11.465"

Do Check out the AWS Certification Course offered by Intellipaat.

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
2 answers
asked Feb 18, 2021 in Java by Jake (7k points)

1.2k questions

2.7k answers

501 comments

693 users

Browse Categories

...