[英]when we trigger lambda function from s3. how to get the logs that lambda is triggred or not. i want to do this with terraform
Need to get output when trigger lambda function from s3. 从s3触发lambda函数时需要输出。 need to know whether lambda function is triggered or not. 需要知道是否触发了lambda函数。 I can check in the console but need to be done with the terraform 我可以检查控制台,但需要完成terraform
I tried with resource "aws_cloudwatch_metric_alarm" but no I don't know weather lambda triggered or not 我试过资源“aws_cloudwatch_metric_alarm”,但不知道我不知道天气lambda是否被触发
If you don't get an alarm notification then this means that your Lambda executed without any issues. 如果您没有收到警报通知,那么这意味着您的Lambda执行没有任何问题。 That's the whole point of alarms: To be notified when things go wrong. 这就是警报的全部要点:在出现问题时通知。 So you should test your lambda and see if the errors are reported in "Monitoring", check if the alarm is triggered and the notifications sent. 因此,您应该测试您的lambda并查看是否在“监控”中报告了错误,检查是否触发了警报并发送了通知。 In addition you can trigger notifications when your alarm goes from alarm to normal 此外,您可以在闹钟从闹钟变为正常时触发通知
You could send an SNS notification at the end of your Lambda code, but this approach would be cumbersome, as you would have to figure what' missing. 您可以在Lambda代码的末尾发送SNS通知,但这种方法很麻烦,因为您必须弄清楚丢失的内容。
Setting up your Lambda and the alarms with Terraform is another task You should come up with specific questions about this. 使用Terraform设置Lambda和警报是另一项任务您应该提出有关此问题的具体问题。 What you've tried and what does not work. 你尝试了什么,什么不起作用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.