Bobcares

AWS Backup job failed notification: Amazon Simple Notification Service

by | Aug 23, 2021

Wondering how to get AWS Backup job failed notification? We can help you!

As a part of our AWS Support Services, we often receive similar requests from our AWS customers.

Today, let’s see the steps followed by our Support Techs to help our customers to get the AWS Backup job failed notification.

 

AWS Backup job failed notification

 
We can enable AWS Backup notifications by using Amazon Simple Notification Service (Amazon SNS) and the AWS Command Line Interface (AWS CLI). Amazon SNS enables to send messages or notifications directly to users.

Now let’s see the steps to configure Amazon SNS and the backup vault for notifications:

  1. Firstly, we need to create an SNS topic to send AWS Backup notifications.
  2. Then we need to configure the backup vault to send notifications to the SNS topic.
  3. Create SNS subscriptions.
  4. Finally, monitor emails for notifications.

 

Create an SNS topic

 

  1. Log in to the AWS Management Console and then open the Amazon SNS console.

2. Then select Topics and select Create topic.

3. Provide a name for the topic for the option Name and then select Create topic.

4. Copy the Amazon Resource Name (ARN) from the topic created. The ARN will be needed in the following steps.

5. In the topic details window, select the Access policy tab and select Edit.

6. In the JSON editor, append the following permissions into the policy:

{
"Sid": "My-statement-id",
"Effect": "Allow",
"Principal": {
"Service": "backup.amazonaws.com"
},
"Action": "SNS:Publish",
"Resource": "arn:aws:sns:eu-east-2:222222222:sampletopic"
}

Replace the Resource value with the copied ARN.

7. Click Save changes.
 

Configure the backup vault to send notifications

 

  1. Firstly, we need to install and configure the AWS Command Line Interface.

2. From AWS CLI run the following command put-backup-vault-notifications with –backup-vault-events set to BACKUP_JOB_COMPLETED.

aws backup put-backup-vault-notifications --endpoint-url https://backup.eu-west-1.amazonaws.com --backup-vault-name examplevault --sns-topic-arn arn:aws:sns:eu-east-2:222222222222:sampletopic --backup-vault-events BACKUP_JOB_COMPLETED

Replace the following values from the above command:

endpoint-url: The endpoint for the AWS Region where the backup vault is present.
eu-east-2: The AWS Region where the backup vault is present.
backup-vault-name: The name of the backup vault
sns-topic-arn: The ARN of the SNS topic.

3. To confirm that notifications are configured, run the get-backup-vault-notifications command.

aws backup get-backup-vault-notifications --backup-vault-name samplevault

Output:

{
"BackupVaultName": "samplevault",
"BackupVaultArn": "arn:aws:backup:eu-east-2:2222222222:backup-vault:samplevault",
"SNSTopicArn": "arn:aws:sns:eu-west-1:22222222222:sampletopic",
"BackupVaultEvents": [
"BACKUP_JOB_COMPLETED"
]
}

 

Creating SNS subscriptions

 

  1. Log in to the AWS Management Console and then open the Amazon SNS console.

2. Select Subscriptions and then select Create subscription.

3. Select the SNS topic for Topic ARN.

4. Select Email-JSON for protocol.

5. Type the desired email in the Endpoint section to receive notifications.

6. Then expand the Subscription filter policy and then enter the following in the JSON editor.

{
"State": [
{
"anything-but": "COMPLETED"
}
]
}

7. Select Create subscription.

8. Check the email for the confirmation message and make sure to confirm the SNS subscription.
 

Monitor emails for notifications

 
When the backup vault has an unsuccessful backup job, we get an email notification to the email account similar to the following:

"An AWS Backup job was stopped. Resource ARN : arn:aws:ec2:eu-east-2:222222222222:volume/vol-sample56d7w92d4b. BackupJob ID : sample4-3dd5-586678-b52d-80bd74565b5"

[Need help with more AWS queries? We’d be happy to assist]
 

Conclusion

 
To conclude, today we discussed the steps followed by our Support Engineers to help our customers to get AWS Backup job failed notification.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.