Trigger AWS CloudWatch Event Manually

假如想象 提交于 2020-07-18 07:11:25

问题


I have a event in CloudWatch, which is triggered once a day. Is there a way to trigger the event manually (for testing purposes)?

...I realize I can increase the frequency of the event's triggering schedule.


回答1:


If you have a cloudwatch alarm set up, using the AWS CLI you can, for testing purposes, set the alarm state of that alarm:

aws cloudwatch set-alarm-state --alarm-name "myalarm" --state-value ALARM --state-reason "testing purposes"

see the docs here

Alternatively you can put a custom event, also using the CLI or the SDKs



来源:https://stackoverflow.com/questions/58034488/trigger-aws-cloudwatch-event-manually

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!