Handle AWS Batch job failures in Slack

Michael Wittig – 27 Dec 2017

AWS Batch runs batch computing jobs for you.

With marbot, you get alerts in Slack when a job fails.

Preparations

  1. You need to create an SNS topic
  2. Configure your SNS topic to allow messages from CloudWatch Events

Set up instructions

  1. Visit https://console.aws.amazon.com/cloudwatch/home?region=us-east-1
  2. Click on the Rules link on the left
  3. Click on the Create rule button
    Setting up Batch alerts
  4. In the Event Source section, click on the Edit link
    Setting up Batch alerts
  5. Paste the following JSON into the text area

    {
    "source": [
    "aws.batch"
    ],
    "detail-type": [
    "Batch Job State Change"
    ],
    "detail": {
    "status": [
    "FAILED"
    ]
    }
    }
  6. Save by clicking the Save button

  7. In the Targets section, click on the Add target button
  8. Select SNS topic
  9. Set Topic to marbot or your other SNS topic name
    Setting up Batch alerts
  10. Save by clicking the Configure detail button
  11. In the next step, set a Name and save by clicking the Create rule button.

Sample Alert

To simulate an alert, you need a Batch job that fails. The following alert will be triggered by marbot soon.

Batch Alert

Michael Wittig

Michael Wittig

Consultant focusing on Amazon Web Services (AWS). Entrepreneur building marbot.io. Author of Amazon Web Services in Action, Rapid Docker on AWS, and cloudonaut.io.

You can contact me via Email, Twitter, and LinkedIn.

Published on

marbot teaser

AWS monitoring & alerting in Slack

marbot takes care of your Amazon Web Services (AWS) monitoring setup. You receive and close all relevant alerts via Slack. marbot integrates with CloudWatch, Elastic Beanstalk, EC2, RDS, any many more.

Slack icon
Add to Slack