AWS Backup失败备份通知及每周报告获取方法咨询
AWS Backup: Failed Backup Alerts & Weekly Reporting
Failed Backup Notifications (CloudWatch Metrics Aren’t the Right Path)
You’re spot-on that CloudWatch metrics don’t directly expose backup job failures—but EventBridge + SNS is the go-to solution here. Here’s how to set it up step by step:
- First, create an SNS topic (if you don’t have one already) — this will be your alert destination (email, SMS, or even a Slack channel via a quick Lambda hook).
- Head to EventBridge and create a new rule:
- Under "Event source", select "AWS events or EventBridge partner events".
- For the event pattern, pick "AWS services" as the source, then choose "AWS Backup" as the service name.
- Select the event types you care about:
BACKUP_JOB_FAILED(addCOPY_JOB_FAILEDorRESTORE_JOB_FAILEDtoo if you need those alerts). - Add filters to narrow alerts to specific backup plans, resources, or regions if you don’t want notifications for every failure across your account.
- Link the rule to your SNS topic as the target. Now every time a backup fails, you’ll get an immediate alert with all critical details: resource ARN, failure reason, timestamp, and more.
Weekly AWS Backup Reporting
For that weekly summary ("25 resources being backed up, 175 recovery points in the last 7 days"), a serverless combo of Lambda + EventBridge Scheduler will do the trick:
- Build a Lambda function (Python with boto3 is perfect for this):
- Fetch all your backup plans, then list resources assigned to each using
list_backup_plan_selections. Count unique resources to get your "active backup resources" number. - Use
list_recovery_points_by_backup_vaultwith a filter forCreationDateset to the last 7 days. Count these to get your recovery point total. - Generate a clean, human-readable report string, like:
Weekly AWS Backup Summary: - Total resources in backup plans: 25 - Recovery points created in the last 7 days: 175 - (Optional) Failed backup jobs in the last 7 days: 3 - Send this report to your SNS topic (or directly via SES if you want to email it without an intermediary).
- Fetch all your backup plans, then list resources assigned to each using
- Schedule the Lambda function with EventBridge Scheduler:
- Create a weekly schedule (e.g., every Sunday at 9 AM UTC) and set your Lambda function as the target. Now your report will land in your inbox (or preferred channel) automatically every week.
Pro tip: You can expand the Lambda function to include extra details like failure rates, oldest recovery points, or backup vault storage usage if you want a more comprehensive overview.
内容的提问来源于stack exchange,提问作者Nipazz
相关产品推荐
相关产品推荐

