Handle AWS Batch job failures in Slack or Microsoft Teams

Michael Wittig – 27 Dec 2017

AWS Batch runs batch computing jobs for you.

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

Set up instructions

Monitoring Setup Assistant
Are you in a hurry? Ask marbot to monitor Batch for you and receive alerts in Slack or Microsoft Teams.

  1. Add marbot to Slack or Microsoft Teams.
  2. Invite marbot to a channel.
  3. In the channel, type:
    @marbot Monitor my Batch jobs
  4. Hit enter and follow the wizard.
  1. You need to create an SNS topic
  2. Configure your SNS topic to allow messages from EventBridge
  3. Visit https://console.aws.amazon.com/cloudwatch/home?region=us-east-1
  4. Click on the Rules link on the left
  5. Click on the Create rule button
    Setting up Batch alerts
  6. In the Event Source section, click on the Edit link
    Setting up Batch alerts
  7. Paste the following JSON into the text area

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

  9. In the Targets section, click on the Add target button
  10. Select SNS topic
  11. Set Topic to marbot or your other SNS topic name
    Setting up Batch alerts
  12. Save by clicking the Configure detail button
  13. 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

Chatbot for AWS Monitoring

Configure monitoring for Amazon Web Services: CloudWatch, EC2, RDS, EB, Lambda, and more. Receive and manage alerts via Slack. Solve incidents as a team.

Slack
Add to Slack
Microsoft Teams
Add to Teams