AWS Lambda Java: Lambda was not able to unzip the file

前端 未结 3 425
耶瑟儿~
耶瑟儿~ 2021-01-21 13:05

I\'m trying to use Java with AWS Lambda. I created a jar file with all dependencies (using maven-assembly-plugin). Upon uploading, I cannot call the lambda. I receive the error

3条回答
  •  余生分开走
    2021-01-21 13:21

    maven-assemply-plugin needs to be told to output a zip, not a jar. (I didn't even know there was a difference!)

    Add this to its configuration:

    
         org.apache.maven.plugins
         maven-assembly-plugin
         ...
         
             ...
             
                zip
             
         
    
    

提交回复
热议问题