简体   繁体   中英

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!

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM