I am an android developer and exploring Amazon AWS for my future appliaction as a backend option. I had explored various AWS services such as dynamoDB, S3, SES and cool lambda feature with JAVA. During my learing I found/prepared a code for creating thumbnail images for every image uploaded to S3 bucket. I successfully written the Lambda code in java in eclipse IDE and able to upload and use it using AWS console for the purpose it was intended.
My Concern is that when I uploaded the JAVA Lambda code to AWS it appears 49 MB in SIZE. When I seek for the reason I found that there are plenty of jars were used in project under AWS sdk for java. Is this normal or I can reduce the size of uploaded code anyhow. Please guide me How can I reduce the size efficiently. I also seen the node.js Lambda code for same and its in KBs only. Might bbe I am doing some wrong things.
Please Help...
Simple answer - you're doing it right and package size can't be reduced to a size comparable to a node.js application.
For node.js lambda, amazon has AWS SDK libraries in place so you have to upload only your own code and third party libraries. But for java lambda, the AWS SDK must be packaged with the application.
But you can reduce package size by carefully selecting which libraries to include and excluding unnecessary dependencies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With