Lambda function with java archive - Best practice

0

The lambda function allows both .jar and .zip file to be uploaded for a java archive.

However, would like to understand what is the recommended archive to use? My understanding was that as the java archive format is a .jar, it is the right one to use. But, why was even .zip archives allowed for a java archive? Are there any limitations with using .jar archive that .zip was also allowed?

已提問 2 個月前檢視次數 116 次
1 個回答
0

From the documents, it calls out using ZIP for Gradle and JAR for Maven. The difference appears to be that Maven has the shade plugin (which builds a shaded / uber-jar), and Gradle packages the JAR and its classpath into a ZIP file. Either format needs to include all the dependencies required, and lambda supports uploading either so long as they have the correct file structure.

Hope that helps, Chris

AWS
Chris C
已回答 2 個月前
profile picture
專家
已審閱 2 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南