mike
mike

Reputation: 141

AWS SDK sample error

I currently downloaded and installed the AWS sdk on an EC2 instance using mvn package and everything seemed to install correctly. When I try to run the DynamoDB sameple, it fails with all this:

AmazonDynamoDBSample.java:18: error: package com.amazonaws does not exist
import com.amazonaws.AmazonClientException;
                    ^
AmazonDynamoDBSample.java:19: error: package com.amazonaws does not exist
import com.amazonaws.AmazonServiceException;
                    ^
AmazonDynamoDBSample.java:20: error: package com.amazonaws.auth does not exist
import com.amazonaws.auth.ClasspathPropertiesFileCredentialsProvider;
                     ^

It seems as though the AWS sdk didn't install properly. Any help?

Upvotes: 4

Views: 8824

Answers (1)

niharika
niharika

Reputation: 91

create a maven project and add the following dependency in your pom.xml everything would work fine.

<dependency>
    <groupId>com.amazonaws</groupId>
    <artifactId>aws-java-sdk</artifactId>
    <version>1.8.7</version>
</dependency>

Upvotes: 3

Related Questions