title: NoSuchMethod when calling AWS Lambda using the AWS Sdk
body: <p>I've created &amp; deployed one simple GET API in API Gateway and here is the ARN and there is no authentication whatsoever on this function, I can simply call it on my browser</p>
  
  <pre><code>arn:aws:lambda:ap-southeast-1:XXXXXXXXXXXXXX:function:La
  </code></pre>
  
  <p>and the public url that can be browsed using the browser is:</p>
  
  <pre><code>https://xxxxxxxxx.execute-api.ap-southeast-1.amazonaws.com/v1/lambda/geta
  </code></pre>
  
  <p>and I'm using Spring boot project and the below code to invoke the API (Following <a href="https://aws.amazon.com/blogs/developer/invoking-aws-lambda-functions-from-java/" rel="nofollow noreferrer">this Doc</a>)</p>
  
  <p>The interface as the lambda service</p>
  
  <pre><code>package com.xxxxxxx.services.interfaces;
  
  import com.amazonaws.services.lambda.invoke.LambdaFunction;
  
  public interface ILambdaGetBalance {
  
      @LambdaFunction(functionName="La")
          String getA();
      }
  </code></pre>
  
  <p>The service using that interface to call the lambda function</p>
  
  <pre><code>import org.springframework.beans.factory.annotation.Value;
  import org.springframework.stereotype.Service;
  
  import com.xxxxxxxx.services.interfaces.ILambdaGetBalance;
  import com.amazonaws.auth.AWSCredentials;
  import com.amazonaws.auth.AWSStaticCredentialsProvider;
  import com.amazonaws.auth.BasicAWSCredentials;
  import com.amazonaws.services.lambda.AWSLambda;
  import com.amazonaws.services.lambda.AWSLambdaClientBuilder;
  import com.amazonaws.services.lambda.invoke.LambdaInvokerFactory;
  
  @Service
  public class LambdaService {
  
      @Value("${aws.access-key}")
      private String accessKey; 
  
      @Value("${aws.secret-key}")
      private String secretKey;
  
      @Value("${aws.lambda.region-name}") // this is ap-southeast-1
      private String regionName;
  
      public void test() {
          AWSCredentials credentials = new BasicAWSCredentials(accessKey,
                  secretKey); 
          AWSLambda client = AWSLambdaClientBuilder.standard()
                  .withCredentials(new AWSStaticCredentialsProvider(credentials))
                  .withRegion(regionName)
                  .build();
  
          final ILambdaGetBalance getBalance = LambdaInvokerFactory.builder()
                  .lambdaClient(client)
                  .build(ILambdaGetBalance.class);
  
          getBalance.getA();
      }
  }
  </code></pre>
  
  <p>after calling the getA function the system will through the following exception:</p>
  
  <pre><code>java.lang.NoSuchMethodError: com.amazonaws.services.lambda.AWSLambdaClient.beforeClientExecution(Lcom/amazonaws/AmazonWebServiceRequest;)Lcom/amazonaws/AmazonWebServiceRequest;
  </code></pre>
  
  <p>Any idea why is this happening? What am I missing?</p>