I built a Docker Lambda Image using the following DockerFile
FROM registry.access.redhat.com/ubi8/ubi:8.1 as baseRUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpmRUN yum update -yRUN yum install -y sudo bash curl wget man-db nano bash-completionRUN yum install -y java-11-openjdk-develRUN java -versionENTRYPOINT [ "/usr/bin/java", "-cp", "./*", "com.amazonaws.services.lambda.runtime.api.client.AWSLambda" ]CMD ["optimizerMarsExecutor.OptimizerMarsExecutorFunction::handleRequest"]
After building and tagging the image, I executed the Lambda function with the following commands
docker run -p 9000:8080 mars-console-linux-imagecurl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{"payload":"hello world!"}'
Following the executiong of the commands above, I received the following errors:
Error: Could not find or load main class com.amazonaws.services.lambda.runtime.api.client.AWSLambdaCaused by: java.lang.ClassNotFoundException: com.amazonaws.services.lambda.runtime.api.client.AWSLambda
What am I missing?