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?

demandé il y a 2 mois116 vues
1 réponse
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
répondu il y a 2 mois
profile picture
EXPERT
vérifié il y a 2 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions