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?

feita há 2 meses116 visualizações
1 Resposta
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
respondido há 2 meses
profile picture
ESPECIALISTA
avaliado há 2 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas