Effect of optimizing Java deployment artifacts on AWS Lambda

Abstract

AWS Lambda (Amazon Web Services) is the most popular serverless architecture provided by Amazon. It currently supports three platforms: JavaScript, Python, and Java Virtual Machine (JVM). The JVM could be the most complicate platform among the three as there are many languages that target the JVM platform besides Java. In addition, the complex hierarchy of dependencies, versioning, and the class loader are major issues that could cause conflict in a project. Deployment in the context of a serverless architecture means deployment as a function that represents a single service rather than as an application that is comprised of many services. AWS Lambda requires a deployment artifact to be self-contained which means all resources and dependencies must be packaged into a single jar file, and this file could be larger than AWS Lambda's allowable limit. Developers usually use build tool plugins to make self-contained artifacts, and those tools are generally unaware of what class and resource files a function needs. As a result, the artifact is not optimized. This paper demonstrates that optimization of an artifact can in general improve its resource usage and runtime performance. This paper also reports the result of an anecdotal experiment regarding the overhead of calling functions remotely in order to support design decisions in the development of AWS Lambda.

Topics

28 Figures and Tables

Download Full PDF Version (Non-Commercial Use)