Sarimm Chaudhry
Sarimm Chaudhry

Reputation: 199

My JAR file is too big too upload onto AWS lambda

so i am building an aws project with a lambda function in java i have created the function in INTELLJ as a MAVEN project, and have run the maven package to pakcage my project into a jar file, after i tried directly uploading onto aws lambda but it wouldnt let me because the jar file was too large due to the fact that is was a fat jar, so i tried putting the jar on an s3 bucket and while i was successfully able to put it onto s3 when i tried to refernce from lambda it again gave the size limit error, keeping in mind that my file 65.75 MB and limit was i think 50. So is there any way i can get around this and still be able to upload the fat 65.75 MB jar onto lambda. Or a way to just cut down the size of the as its kind of a large project.

Any Help Would be Appreciated, Thanks!

Upvotes: 2

Views: 3244

Answers (1)

Mark Sailes
Mark Sailes

Reputation: 852

If you upload your artifact to S3 your code can be up to 250MB (when it's decompressed)

My advice would be to check your packaging method and follow the instructions on the Lambda developer guide.

If your code needs more than 250MB when it's decompressed then you can use the container image packaging method.

Upvotes: 2

Related Questions