DEV Community

Cover image for Add Logging to AWS Lambda Without Redeploying Using a Simple Extension
Marko - ServerlessLife.com
Marko - ServerlessLife.com

Posted on β€’ Originally published at serverlesslife.com

3

Add Logging to AWS Lambda Without Redeploying Using a Simple Extension

A reusable extension for Node.js Lambda that logs requests and responses without code changes or redeployment. Learn how to use it and how I built it.

The Challenge of Debugging AWS Lambda in Production

Debugging Lambda functions in production can be challenging. Without sufficient logging, it’s often difficult to diagnose issues in the system. You could use some observability tools like Lumigo. You could also use Lambda Live Debugger with Observability mode. In most cases, you are mostly left to the mercy of the logs you have. However, excessive logging in high-traffic serverless applications can lead to high CloudWatch costs.

The ideal solution is temporarily enabling logging without redeploying your Lambda function. But what if you didn’t build logging in a way that would support that? Is there a way to introduce this additional logging?

Fortunately, there is. Using this Lambda extension, you can add it to any Lambda function, even in production environments, with minimal impact on your system. It supports Lambda based on Nodej.js.

Debug smarter, not harder! πŸ”§ A Lambda extension to log requests and responses without redeployment πŸ’ͺ

The extension was originally developed as part of Lambda Live Debugger and a ServerlessSpy tool. Lambda Live Debugger is a tool that enables remote debugging of Lambda functions. It also speeds up development because you can avoid constant and timely redeploys. ServerlessSpy is a CDK-based library for writing elegant integration tests on AWS serverless architecture. It has an additional web console to monitor events in real-time.

...continue reading

Billboard image

Synthetic monitoring. Built for developers.

Join Vercel, Render, and thousands of other teams that trust Checkly to streamline monitor creation and configuration with Monitoring as Code.

Start Monitoring

Top comments (0)

Imagine monitoring actually built for developers

Billboard image

Join Vercel, CrowdStrike, and thousands of other teams that trust Checkly to streamline monitor creation and configuration with Monitoring as Code.

Start Monitoring

πŸ‘‹ Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay