AWS Lambda Java incremental improvements

This repository contains AWS Lambda functions with incremental improvements for Java. The improvement ranging from high level no-code changes to experimental changes that will very likely increase the performance of your workload.

All the deployed functions in this sample performs the same task: Store a "product" in a DynamoDB Table and in an S3 bucket

Description of functions and improvements

Requires no code changes

  1. Baseline
  2. Memory optimized - uses 2GB
  3. Package as UberJar
  4. Package as a zipped UberJar
  5. Use Tiered Compilation optimization

Requires code changes

  1. Use eager initialization of handler dependencies
  2. Apply AWS SDK optimizations (credentials/region resoltion, Http Client etc)
  3. Apply multi threading
  4. AWS Kotlin SDK
  5. CrtHttpClient

Advanced

  1. AWS SDK warmup call
  2. GraalVM

Getting started

Download or clone the repository.

Install AWS CDK

Deploy:

./deploy.sh

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.