When I upload a .zip-file containing a .jar-artifact to an AWS Lambda function, the artifact isn't parsed correctly. However, if the artifact is uploaded directly without being zipped, it works as intended.
The error I get in the lambda console when testing a zipped function is the following:
{
"errorMessage": "Class not found: foo.bar.Class",
"errorType": "java.lang.ClassNotFoundException"
}
I must repeat that I am absolutely certain that the artifact when unzipped does not display this behavior. It only happens when the artifact is zipped.
It appears that AWS Lambda simply can't parse zipped Java artifacts. I couldn't find any workaround, so the solution is to not zip your .jars in the first place.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With