airhacks.fm podcast with adam bien

Lighter AWS Lambda Power Tools For Java

·1 hr 6 min·5 clips
AWS Lambda Power Tools buffers debug logs and flushes them automatically when an exception happens.
The episode begins with Adam Bien welcoming back Philip, the tech lead for AWS Lambda Power Tools Java. Philip explains his initial dislike for the library due to its reliance on AspectJ for code generation, comparing it to Lombok. They discuss the historical rationale for AspectJ, noting its performance benefits by offloading work to build time. Philip proposes moving towards a functional interface approach, similar to Quarkus, using tools like Yandex and Gizmo for build-time modifications. The conversation shifts to logging, where Adam criticizes dependencies like SLF4J and advocates for using Java's built-in System Logger or even System.out.println in Lambda environments. Philip details the structured logging and log buffering feature, which proactively flushes debug logs only when errors occur, providing immediate context. They explore metrics via CloudWatch Embedded Metric Format (EMF), highlighting how it avoids API calls by batching JSON logs. Adam emphasizes the killer features of EMF and parameter store caching, which reduces throttling by caching infrequently changed data. Philip explains how the library detects cold starts using a class initialization trick. The discussion delves into thread safety, reflection removal in the metrics utility, and the challenges of multi-threaded logging. They consider future directions, such as supporting Java 25 as a baseline, using scoped values for concurrency, and creating reflection-free handlers with bytecode manipulation. Adam suggests making deserialization pluggable to reduce Jackson dependency, possibly using Java's upcoming java.util.json. The episode concludes with Philip announcing his plans to adopt EMF in production and write an issue about the System Logger, while both express appreciation for the technical exchange.

As heard by us

A practical argument for stripping Lambda Java down to the pieces that still earn their keep.

Adam Bien and Philip keep the focus on the practical side of Lambda tooling, weighing why AspectJ can feel like baggage and how logging and metrics become tightly bound in serverless Java.

Read the full review in PlayNext →

Why you'd press play

You get a Lambda Java take on logging, metrics, and why AspectJ was on the chopping block.

Read the full recommendation in PlayNext →
Listen to the show on