1

I am creating backups of my DynamoDB tables using AWS Backup in my source account A and storing the recovery point ARNs in a vault named X in source account A .

I need to copy and restore the backup in another account named B. I am following the steps below, but my process is failing with the error:

software.amazon.awssdk.services.backup.model.BackupException: Insufficient privileges to perform this action. (Service: Backup, Status Code: 403)

Steps to recreate:

  1. Create backup and store the backup in vault X in account A.
  2. Give permission to target account B to perform action "CopyFromBackupVault" using the vault access policy for vault X of source account.
         {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Effect": "Allow",
          "Principal": {
            "AWS": "arn:aws:iam::account_B_id:root"
          },
          "Action": "backup:CopyFromBackupVault",
          "Resource": "*"
        }
      ]
  1. Give permission to source account A to perform action "CopyIntoBackupVault" using the vault access policy for vault Y of target account.
    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Effect": "Allow",
          "Principal": {
            "AWS": ["arn:aws:iam::account_A_id:root",
                    "arn:aws:iam::account_B_id:root"]
          },
          "Action": "backup:CopyIntoBackupVault",
          "Resource": "*"
        }
      ]
    }
  1. After these steps from target account B, I am initiating the copy job but it is failing with error with error > software.amazon.awssdk.services.backup.model.BackupException: Insufficient privileges to perform this action. (Service: Backup, Status Code: 403).

  2. Restore backup (Not able to reach this step)

Please note, the role I am using has all the permissions required to perform backup actions. I reckon the issue lies in the vault access policies . Please help. Thank you!

I have tried every step mentioned in the AWS documentation that I could find. I have checked with ChatGPT but nothing resolved my issue.

I am expecting my backup to be copied and then restored without any issue.

9
  • Are both accounts in the same AWS Organization? Commented May 6 at 17:52
  • Hello Leeroy ! Yes , both are in same AWS Organization . Commented May 6 at 19:01
  • And in the destination account, you enabled vaults from other accounts? Commented May 6 at 19:35
  • Sorry, i did not understand, what do you mean by enable vaults from other accounts?? Commented May 6 at 19:45
  • Leeroy one more thing I would like to mention I am doing all the steps using java code not via aws console or cli. This info might not be very relevant but still thought of sharing. Commented May 6 at 19:48

1 Answer 1

0

Creating a cross-account copy of a recovery point from AWS Backup requires the correct access policies on both source and destination vault, correct IAM role with policies that allows to create a copy job and cross-account backup to be enabled within the Organization's management account.

From the details provided in the comments, you seem to have everything except enabling cross-account backup within the AWS Organization. This can be done from the Management Account, within the AWS Backup console under My account and Settings.

Lastly, two final points to check, the destination vault cannot be the default vault of the account and the copy job must be started from the source account.

Sign up to request clarification or add additional context in comments.

2 Comments

Hello and thank you ! Yes there were two issues actually . 1.) I didn't enable cross account backup within AWS organization . I have done this now they way you described. 2.) I was initiating my copy job from target account but it should be initiated from source account.
@ShivanshKaldaik Glad to see you have solved the problem, and thank you for letting me know about the source account restriction. I forgot to mention that in my comment, so I've edit it with that detail for completeness.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.