2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

CloudWatchAlarmの発砲テスト方法

Last updated at Posted at 2022-03-06

これは何?

CloudWatchAlarmからSNSへ連携されてLambdaがトリガーされる仕組みを作っていたのですが、
アラート発生のテストで毎回CPU使用率を上げるなど面倒だったが簡単な方法を見つけたのでメモです。

CloudWatchAlarmテストコマンド

<Alarm Name>をテストしたいCloudWatchAlarm名に変更して実行します。

aws cloudwatch set-alarm-state --alarm-name <Alarm Name> --state-value ALARM --state-reason "test"

CloudWatchAlarmのアラーム状態解除コマンド

aws cloudwatch set-alarm-state --alarm-name <Alarm Name> --state-value OK --state-reason "test"
2
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?