We’re announcing today a new feature – you can now see your Lambda function triggers using Epsagon’s automatic function scanning. See them in action in the functions page of our live demo.
Different event sources can trigger Lambda functions, including API Gateway, S3, SNS, Kinesis, CloudWatch, and others. It can sometimes be confusing to keep track of all your services and their different triggers.
Why should you care?
Keeping track of your Lambda triggers is useful for various reasons:
- Troubleshooting issues in your application are easy when you have a good understanding of the triggers
- It helps to stay on top of the evolving design of your serverless application
- You can make sure that there are no mistakes in the event sources
There are two main ways to discover these triggers. One is the configuration files (static). The other is scanning your production deployment (dynamic).
The following example shows the popular serverless.yml file with two functions and three event sources: two HTTP endpoints (/blog and /new_post), and one SNS event.
functions: Request-Processor: handler: handler.main events: - http: path: /blog method: get - http: path: /new_post method: post Post-Analysis: handler: handler.upload events: - sns: "arn:aws:sns:us-east-1:147457102604:Posts-Notifications"
Scanning your functions from production
Starting today, you can automatically discover your these triggers. You will get that information from multiple AWS accounts, all AWS regions, and all programming languages. It comes together with the invocation count, errors, timeouts, out-of-memory conditions, and the monthly cost.
After a few minutes, a quick look at the table will immediately tell you what the event sources of your Lambda functions are. Forget about living in the dark – taking a look at this table will make sure that nobody configured a wrong event source by mistake.
One step further
Since serverless applications are distributed, triggers only tell a part of the story. To see the entire story, distributed tracing is handy. Including the Epsagon library in your functions will automatically discover your distributed application, allowing greater visibility and faster troubleshooting.
In order to get started with Epsagon, sign up here.