1
3

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 5 years have passed since last update.

AWS Batchの結果をCloudWatch Eventsで受け取る

Posted at

ちょうどBatchのエラーをどう検知しようか考えていたところ、CloudWatch EventsでBatchのステータス変更を利用できるようになったよというリリース情報を見つけたのでさっそく試してみました。

設定方法

  • マネジメントコンソールを開きCloudWatchのページを開きます
  • ルール → ルールの作成をクリックします
  • 記事執筆時点ではGUIからBatchの項目を選択できないので、手動で次のようにイベントパターンを入力します。
    この例ではステータスが失敗になった場合のルールを紹介します。
{
  "detail-type": [
    "Batch Job State Change"
  ],
  "source": [
    "aws.batch"
  ],
  "detail": {
    "status": [
      "FAILED"
    ]
  }
}                        
  • ルールの設定はこれで終了です。
  • あとはターゲットで任意の通知先(SNSやLambda関数など)を設定すればOKです

CloudWatch最高!!

1
3
0

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
1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?