简体   繁体   English

为 AWS 禁用 CloudWatchEvent 触发器 lambda function

[英]Disabling CloudWatchEvent trigger for AWS lambda function

I am running a python script on AWS lambda. The trigger of the script is CloudWatchEvent, and I set it to trigger once an hour.我在AWS lambda上运行了一个python脚本,脚本的触发器是CloudWatchEvent,我设置为每小时触发一次。 I want to start and stop the AWS Lambda python script from executing.我想启动和停止执行 AWS Lambda python 脚本。 So far many posts have mentioned that AWS lambda cannot be disabled, hence I want to disable the trigger instead.到目前为止,许多帖子都提到无法禁用 AWS lambda,因此我想改为禁用触发器。 Is there a way to disable programmatically or from the AWS console itself?有没有办法以编程方式或从 AWS 控制台本身禁用?

To disable a CloudWatch event rule, go to the EventBridge service in the AWS console, and select 'Rules' in the left hand pane.要禁用 CloudWatch 事件规则,go 到 AWS 控制台中的 EventBridge 服务,select 在左侧窗格中的“规则”。 Navigate to the event rule that triggers your lambda function.导航到触发您的事件规则 lambda function。

To temporarily disable a rule, select the button next to the rule and choose Actions , Disable , Disable .要暂时禁用规则,请按规则旁边的按钮 select 并选择ActionsDisableDisable Alternatively, use the CLI to disable a rule using aws events disable-rule --name <your rule name here>或者,使用 CLI 禁用规则,使用aws events disable-rule --name <your rule name here>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM