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?

asked 2 months ago109 views
1 Answer
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
answered 2 months ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions