28
No-code AWS Lambda Monitoring
Auto-instrumenting AWS Lambda Monitoring didn’t originate through a focus group or business plan. It started as a hackathon project that addressed the tedium of removing manual code instrumentation. Developer environments often include hundreds of AWS Lambda functions. And our existing instrumentation required initialization code to be manually placed on every single function. So to fix this, our growth team used Amazon CloudWatch to build a prototype that could instrument AWS Lambda functions.
This prototype began by using AWS CloudFormation stack to automatically create resources in a customer environment. Then we streamed Amazon CloudWatch Logs to Sentry through the Amazon Kinesis Data Firehose. This made it so all you had to do was put in your AWS account ID and create the stack using a pre-configured AWS CloudFormation stack.
But in order to get this production-ready, we had to take a closer look at a few things:
Ultimately, this meant that we would not use logs to productize no-code AWS Lambda monitoring, as logs would limit our tracing capabilities. Instead, we used AWS Lambda Extensions, which tied Sentry’s AWS Lambda Layers — along with environment variables and code wrapping — to instrument AWS Lambda functions. Doing so ensured that:
Using the AWS Lambda Layers approach and skipping the Amazon CloudWatch had two minor — but manageable — downsides:
Instrumenting Sentry on your AWS Lambda functions is now as easy as following a following few simple, UI-specific steps:



And that's it! You can even toggle function instrumentation on the fly from the AWS integration management page.

Ok, so why should you care? Well, developers seem to appreciate the value in auto-instrumentation — more than a third of our instrumentations for AWS Lambda monitoring are now coming through auto-instrumentation. The folks at AWS thought it wasn’t bad either. They helped us become an AWS Partner and gave us a AWS Lambda Ready Designation.
You can learn more about Sentry’s support for Serverless Monitoring here.
28