#1 Global Leader in Data Resilience

How to Create Secure IAM Policy for Connection to S3 Object Storage

KB ID: 3151
Product: Veeam Backup & Replication
Published: 2020-04-21
Last Modified: 2024-04-15
mailbox
Get weekly article updates
By subscribing, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.

Cheers for trusting us with the spot in your mailbox!

Now you’re less likely to miss what’s been brewing in our knowledge base with this weekly digest

error icon

Oops! Something went wrong.

Please, try again later.

Article Applicability

This KB article is relevant only to Veeam Backup & Replication 12.0.x and older.

Starting with Veeam Backup & Replication 12.1 (released in December 2023), permissions requirements are now documented within the product user guide:

Challenge

How to create a secure IAM policy to connect to the S3 bucket where backup data is to be stored (Veeam Backup Object Repository).

Solution

There are two policies to choose from. The first policy is for use when immutability is not used for the cloud tier. The second policy is for use when immutability is used for the cloud tier.
 

Non-Immutable Buckets

Use the following JSON for non-immutable buckets to create an IAM Policy. These permissions will allow the Veeam Backup Service to access the S3 repository to save/load data to/from an object repository.

Starting with Veeam Backup & Replication 11a, the ListAllMyBuckets permission is not required if you manually enter the bucket name on the Bucket step of the New Object Repository wizard.

Note: Replace yourbucketname (lines 16 and 17) with the actual bucket name.

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "SecureBucketPolicy0",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject",
"s3:GetBucketLocation",
"s3:GetBucketVersioning",
"s3:GetBucketObjectLockConfiguration"
],
"Resource": [
"arn:aws:s3:::yourbucketname/*",
"arn:aws:s3:::yourbucketname"
]
},
{
"Sid": "SecureBucketPolicy1",
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets",
"s3:ListBucket"
],
"Resource": "*"
}
]
}

Immutable Buckets

Use the following JSON for immutable buckets to create an IAM Policy. These permissions will allow Veeam Backup Service to access the S3 repository to save/load data to/from an object repository.

Starting with Veeam Backup & Replication 11a, the ListAllMyBuckets permission is not required if you manually enter the bucket name on the Bucket step of the New Object Repository wizard.

Note: Replace yourbucketname (lines 23 and 24) with the actual bucket name.

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject",
"s3:GetBucketVersioning",
"s3:GetBucketObjectLockConfiguration",
"s3:ListBucketVersions",
"s3:GetObjectVersion",
"s3:GetObjectRetention",
"s3:GetObjectLegalHold",
"s3:PutObjectRetention",
"s3:PutObjectLegalHold",
"s3:DeleteObjectVersion"
],
"Resource": [
"arn:aws:s3:::yourbucketname/*",
"arn:aws:s3:::yourbucketname"
]
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets",
"s3:ListBucket"
],
"Resource": "*"
}
]
}

Veeam Agent targeting Object Storage Repository Operating in Direct Connection Mode

When a Veeam Agent backup policy is operating in Managed by agent mode and targets a Veeam Backup Repository that is backed by AWS S3 Object Storage using 'Connection mode: Direct,' the Veeam Backup Server and the configured AWS account must be able to create new users on AWS and assign S3 policies to this user.

This IAM policy may also be used for a standalone Veeam Agent deployment targeting a Veeam Backup & Replication/Veeam Cloud Connect managed object storage repository with the Connection mode set to Direct.

Note: The term "Veeam Agent" in this explanation is used as a general term to refer to all Veeam Agent applications (e.g., Veeam Agent for Microsoft Windows, Veeam Agent for Linux, etc.). The links used to provide further context link to the Veeam Agent for Microsoft Windows User Guide, but apply to all Veeam Agent products.

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"iam:GetPolicyVersion",
"iam:DeleteAccessKey",
"iam:GetPolicy",
"iam:AttachUserPolicy",
"iam:DeleteUserPolicy",
"iam:DeletePolicy",
"iam:DeleteUser",
"iam:ListUserPolicies",
"iam:CreateUser",
"iam:TagUser",
"iam:CreateAccessKey",
"iam:CreatePolicy",
"iam:ListPolicyVersions",
"iam:GetUserPolicy",
"iam:PutUserPolicy",
"iam:ListAttachedUserPolicies",
"iam:GetUser",
"iam:CreatePolicyVersion",
"iam:DetachUserPolicy",
"iam:DeletePolicyVersion",
"iam:ListAccessKeys",
"iam:SetDefaultPolicyVersion",
"sts:GetCallerIdentity"
],
"Resource": "*"
}
]
}
To submit feedback regarding this article, please click this link: Send Article Feedback
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.

Spelling error in text

This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply except as noted in our Privacy Policy.
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

Oops! Something went wrong.

Please, try again later.

You have selected too large block!

Please try select less.

KB Feedback/Suggestion

This form is only for KB Feedback/Suggestions, if you need help with the software open a support case

By submitting, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.
This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply except as noted in our Privacy Policy.
Verify your email to continue your product download
We've sent a verification code to:
  • Incorrect verification code. Please try again.
An email with a verification code was just sent to
Didn't receive the code? Click to resend in sec
Didn't receive the code? Click to resend
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

error icon

Oops! Something went wrong.

Please, try again later.