https://login.veeam.com/en/oauth?client_id=nXojRrypJ8&redirect_uri=https%3A%2F%2Fwww.veeam.com%2Fservices%2Fauthentication%2Fredirect_url&response_type=code&scope=profile&state=eyJmaW5hbFJlZGlyZWN0TG9jYXRpb24iOiJodHRwczovL3d3dy52ZWVhbS5jb20va2IzMDYwIiwiaGFzaCI6ImU1MGIzZWJlLTdjNDktNGM5MS04N2FhLTU3OTNhYTBhNzA1ZCJ9
1-800-691-1991 | 9am - 8pm ET
EN

How to Create Custom Worker Instance IAM Role

Challenge

The Worker IAM role is used to launch worker instances for backup and restore using S3 repository.

Solution

To configure a custom Worker IAM Role follow the steps below.

Use the following JSON to create an IAM Policy using the following instructions from the How to create IAM Policy article. These permissions will allow Veeam Backup for AWS service to perform operations required:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "ssm:SendCommand",
                "ssm:GetCommandInvocation",
                "sqs:ListQueues",
                "sqs:CreateQueue",
                "sqs:SetQueueAttributes",
                "sqs:ReceiveMessage",
                "sqs:DeleteMessage",
                "sqs:DeleteQueue",
                "ec2:DescribeRegions",
                "ec2:DescribeAccountAttributes",
                "ec2:DescribeAvailabilityZones",
                "ec2:DescribeRouteTables",
                "ec2:DescribeSecurityGroups",
                "ec2:DescribeVpcs",
                "ec2:DescribeVpcEndpoints",
                "ec2:DescribeSubnets",
                "ec2:DescribeInstances",
                "ec2:DescribeInstanceAttribute",
                "ec2:RunInstances",
                "ec2:StopInstances",
                "ec2:TerminateInstances",
                "ec2:ModifyInstanceAttribute",
                "ec2:DescribeKeyPairs",
                "ec2:CreateKeyPair",
                "ec2:DeleteKeyPair",
                "ec2:DescribeVolumes",
                "ec2:CreateVolume",
                "ec2:AttachVolume",
                "ec2:DetachVolume",
                "ec2:DeleteVolume",
                "ec2:DescribeSnapshots",
                "ec2:CreateSnapshot",
                "ec2:CreateSnapshots",
                "ec2:DeleteSnapshot",
                "ec2:ModifySnapshotAttribute",
                "ec2:CreateTags",
                "ec2:DescribeImages",
                "iam:CreateRole",
                "iam:DeleteRole",
                "iam:CreateInstanceProfile",
                "iam:ListAttachedRolePolicies",
                "iam:ListInstanceProfilesForRole",
                "iam:AddRoleToInstanceProfile",
                "iam:RemoveRoleFromInstanceProfile",
                "iam:AttachRolePolicy",
                "iam:PutRolePolicy",
                "iam:PassRole",
                "iam:DetachRolePolicy",
                "iam:DeleteRolePolicy",
                "iam:ListRolePolicies",
                "iam:DeleteInstanceProfile",
                "iam:GetRole",
                "iam:GetInstanceProfile",
                "ebs:ListChangedBlocks",
                "ebs:ListSnapshotBlocks",
                "kms:ListKeys",
                "kms:ListAliases",
                "kms:GetKeyPolicy",
                "kms:ReEncryptTo",
                "kms:ReEncryptFrom",
                "kms:DescribeKey",
                "ec2:GetEbsDefaultKmsKeyId",
                "kms:CreateGrant",
                "servicequotas:ListServiceQuotas",
                "ec2:DescribeTags",
                "ec2:DescribeInstanceStatus",
                "ec2:StartInstances",
                "sqs:SendMessage",
                "sts:GetSessionToken",
                "ebs:ListChangedBlocks",
                "ebs:ListSnapshotBlocks",
                "ec2:DescribeVolumeAttribute",
		"iam:GetContextKeysForPrincipalPolicy",
		"iam:SimulatePrincipalPolicy"
            ],
            "Resource": "*"
        }
    ]
}
The following role configuration steps will vary depending on in which account the created Worker IAM role will be located in relation to your Veeam Backup for AWS service.
 

Worker IAM Role and Veeam Backup for AWS service will be located in different accounts

 
  1. Navigate to Roles in the IAM Service.
  2. Choose Create role.
  3. Select the type of the trusted entity Another AWS Account.
  4. In the Account ID field, enter the ID of your Backup Account (you can get this number in the AWS console of the Backup Account, in My Account located in the top-right menu).
  5. Select the Require external ID checkbox and enter a pass phrase to raise the level of security for the role.
  6. Click Next: Permissions.
  7. In the filter policies search box, enter the name of the policy created in the Step 1.
  8. In the first column, select the policy.
  9. Click Next: Tags.
  10. Enter tagging info if needed and click Next: Review.
  11. Assign a name to the IAM Role. This name will be used in Veeam Backup for AWS (e.g. vb4aws_workers_role).
  12. Click Create role.
  13. Once the role is created, you will be able to see it in the list of available roles.

Alternatively, you can use create role wizard with Service role checked in configuration.
 

Worker IAM role will be created in the same account as the Veeam Backup for AWS service

 
  1. Navigate to Roles in the IAM Service.
  2. Choose Create role.
  3. Select the type of the trusted entity AWS Service.
  4. Select EC2 in Choose the service that will use this role.
  5. Click Next: Permissions.
  6. In filter policies search box, enter the name of the policy created in the Step 1 
  7. In the first column, select the policy.
  8. Click Next: Tags.
  9. Enter tagging info if needed and click Next: Review.
  10. Assign a name to the IAM Role. This name will be used in Veeam Backup for AWS (e.g. vb4aws_worker_role).
  11. Click Create role.
  12. Once the role is created, you will be able to see it in the list of available roles.
  13. To add this role to the Veeam Backup for AWS service, you must update Trust relationships for the created role as described in this article.
KB ID:
3060
Product:
Veeam Backup for AWS
Version:
Any
Published:
2020-06-24
Last Modified:
2020-08-13
Please rate how helpful this article was to you:
5 out of 5 based on 1 ratings
Thank you for helping us improve!
An error occurred during voting. Please try again later.

Couldn't find what you were looking for?

Below you can submit an idea for a new knowledge base article.
Report a typo on this page:

Please select a spelling error or a typo on this page with your mouse and press CTRL + Enter to report this mistake to us. Thank you!

Spelling error in text

Knowledge base content request
By submitting, you agree that your personal data will be managed by Veeam in accordance with the Privacy Policy.
Your report was sent to the responsible team. Our representative will contact you by email you provided.
We're working on it please try again later