Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Error when update AWS Java Lambda Function through Bitbucket Pipelines - java.lang.ClassNotFoundExce

Israel Sánchez February 14, 2020

I have a basic AWS Lambda Java Function my-function


public class Hello implements RequestHandler<Request, Response> {
  public Response handleRequest(Request request, Context context) {
    String greetingString = String.format("Hello %s", request.name);
    return new Response(greetingString);
  }
}

That Lambda function is registered in AWS well, the controller is com.tds.Hello and is related to AWS API Gateway correctly.

The final JAR is built through Maven without a problem. When I upload the JAR directly in AWS the function works well.

The problem is when I use Bitbucket Pipelines in order to do an automatic upload (and update) after committing code, the pipeline runs well with success status following this tutorial => https://bitbucket.org/blog/automating-aws-lambda-deployments (Automating AWS Lambda deployments)] but when I test/run the function in AWS I get the following error:

> {"errorMessage":"Class not found: com.tds.Hello","errorType":"java.lang.ClassNotFoundException"}

Does anyone has faced this issue?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events