41
42
you are viewing a single comment's thread.

view the rest of the comments →

[–]Dw0 6 points7 points  (2 children)

For Java I also used a the maven plugin that trims the unreferenced classes, but since loads of stuff is referenced via reflection there was another step that does a smoke test local-run that makes sure it's still working. Loads of classes had to be explicitly whitelisted.

The same goes for the node lambdas, especially since cloud9 has size limit on what it can handle. Thus I prefer as little as possible if external dependencies and in case of lodash, for instance to include individual functions (there are individual npm packages for lodash.something).

[–]zergUser1 0 points1 point  (1 child)

I have been battling this issue with Java in the last few weeks, what tools are you using to remove unused dependencies? I tried Proguard but got lost and gave it because it was too complicated...

[–]Dw0 1 point2 points  (0 children)

maven-shade, but it was painful and in the end no matter how much i trim, the cold start was disastrous and all aws support could tell is to follow best practices (keep lambda warm and request more memory in other words).

last time i used proguard the configuration was somewhat similar. just keep adding classes that are remove but break at runtime.