Skip to content

Instantly share code, notes, and snippets.

@ChadDevOps
Created February 9, 2020 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChadDevOps/8d4a1e51b3b98750888f69e8161b1cda to your computer and use it in GitHub Desktop.
Save ChadDevOps/8d4a1e51b3b98750888f69e8161b1cda to your computer and use it in GitHub Desktop.
Bash script using AWS Cli to check various systems for daily email
#!/bin/bash
# /etc/cron.daily/aws
# Check AWS SES Suppression List
OUTPUT="$(aws sesv2 list-suppressed-destinations --profile default)"
ISEMPTY=`echo "${OUTPUT}" | grep '".*SuppressedDestinationSummaries": \[\].*'`
[ -z "$ISEMPTY" ] && echo "${OUTPUT}" | mail -s "[AWS-DAILY] Daily Suppressed Destinations" info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment