Package com amazonaws services lambda runtime showing does not exist in AWS java sdk 1 10 2

+3 votes

I have been trying to run the Java code example in the Getting Started (Authoring AWS Lambda Code in Java) in this page but I am stuck as package looks like its missing.

Showing the sample code below:

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 am facing the same error both in Netbeans and in command line even after mentioning the aws sdk thorugh -cp argument from the first 2 imports in the code below:

package does not exist

While importing other packages from the SDK its working fine, as from the third and the fourth imports in 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 this website:

All of your suggestions and helps are welcome! Thanks in Advance!

May 2, 2018 in AWS by Flying geek
• 3,280 points

3 answers to this question.

0 votes

Dude, you are trying to use java code sample from AWS LAMBDA website:https: THIS for another product Amazon AWS SDK For Java.

Please read AWS Lambda welcome-page and  then after those steps create account and others and you can download package with your classes including Context, LambdaLogger.


answered May 3, 2018 by Cloud gunner
• 4,670 points
0 votes

After some searching I found in . (I prefer this site to gets right to the heart of my problem by supplying the sbt build line.)

The class is not in aws-java-sdk-lambda , nor is it in aws-java-sdk-core, or aws-java-sdk .

answered Aug 1, 2018 by bug_seeker
• 15,520 points
0 votes
  1. Add AWS plugins within eclipse from market place, make aws lambda project.
  2. Use below three dependencies to make fat jar.

answered Aug 23, 2018 by Priyaj
• 58,090 points

Related Questions In AWS

0 votes
0 answers
0 votes
0 answers

Java snapstart is not available in AWS Lambda

I have started to write Java Lambdas ...READ MORE

Jan 3, 2023 in AWS by Tejashwini
• 3,820 points
0 votes
1 answer

What does event represent in AWS Lambda?

The Events that are passed to Lambda function as ...READ MORE

answered Jan 25, 2019 in AWS by Esha

edited Jan 25, 2019 616 views
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,090 points
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+5 votes
2 answers

Can we export/migrate users from AWS cognito, does it cause vendor lock-in?

Cognito actually has the capability to import ...READ MORE

answered Aug 1, 2018 in AWS by bug_seeker
• 15,520 points
+1 vote
2 answers

How do I get my AWS Glue client in JAVA?

Hey, you've been using a correct code ...READ MORE

answered Apr 17, 2018 in AWS by Cloud gunner
• 4,670 points
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP