Skip to content

package does not exist in AWS java sdk 1.10.2

I am trying the Java code example in the Getting Started (Authoring AWS Lambda Code in Java) page, but am stuck as pacakge seems to be missing

Here is the sample code:

package example;

import;      //package does not exist error
import; // package does not exist error
import;       // import works (not needed, I've put them in for testing import)
import; // import works (not needed, I've put them in for testing import)

public class Hello {
    public String myHandler(int myCount, Context context) {
        LambdaLogger logger = context.getLogger();
        logger.log("received : " + myCount);
        return String.valueOf(myCount);

I encounter the same error both in Netbeans and through command line (specifying the aws sdk thorugh -cp argument) from the first two imports of the code:

package does not exist

Note importing other packages from the SDK works fine, as per third and fourth imports from the above code (the s3 imports which i put in just to test).

I am using version 1.10.2 ( of the AWS Java SDK, downloaded from

Any directions/suggestions would be much appreciated. Thanks!



Both of those classes are contained in the aws-lambda-java-core jar, which is distributed separately from the AWS SDK. You can download it from maven central at the link above if you’re not using maven/gradle/some other build system that can natively pull from maven central.

6 People found this is helpful