-
-
Save ChadDevOps/8d4a1e51b3b98750888f69e8161b1cda to your computer and use it in GitHub Desktop.
Bash script using AWS Cli to check various systems for daily email
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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