简体   繁体   中英

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. I want to start and stop the AWS Lambda python script from executing. So far many posts have mentioned that AWS lambda cannot be disabled, hence I want to disable the trigger instead. Is there a way to disable programmatically or from the AWS console itself?

To disable a CloudWatch event rule, go to the EventBridge service in the AWS console, and select 'Rules' in the left hand pane. Navigate to the event rule that triggers your lambda function.

To temporarily disable a rule, select the button next to the rule and choose Actions , Disable , Disable . Alternatively, use the CLI to disable a rule using aws events disable-rule --name <your rule name here>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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