检查消耗AWS Lambda的东西 [英] Checking what consumes AWS lambda
问题描述
我有我的AWS lambda,叫它Lambda-X.
I have my AWS lambda, lets call it Lambda-X.
还有其他lambda,我不知道它们的名字,它们通过API调用消耗了我的Lambda-X.
There are other lambdas, I don't know their names, that consumes my Lambda-X via API call.
如何确定向我的Lambda-X发送请求的lambda的名称/ip/标识符?
How do I determine the names/ip/identifier of lambdas that sending requests to my Lambda-X?
推荐答案
CloudWatch Metrics显示每个Lambda函数的调用次数.这将帮助您确定最频繁触发哪个Lambda.
CloudWatch Metrics shows the number of invocations of each Lambda function. That will help you to determine which Lambda is being triggered the most frequently.
如果这还不够的话,那么每个Lambda函数显然都有一个唯一的名称.您可以修改您的初始Lambda函数,以将该名称作为附加的源"事件参数发送到被调用的Lambda-X,然后将其作为
If that's insufficient, then each Lambda function obviously has a unique name. You could modify your initial Lambda functions to send that name as an additional 'source' event parameter to the invoked Lambda-X and then surface that as a custom metric.
或者假设您的lambda在每次调用Lambda-X时都发出一个标识日志,则可以抓取CloudWatch Logs.这不是一个很好的解决方案,但可能对您有用.
Or you could scrape CloudWatch Logs, assuming that your lambdas emit an identifying log each time they invoke Lambda-X. Not a pretty solution, but might work for you.
这篇关于检查消耗AWS Lambda的东西的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!