Skip to content

Veeam Cloud Connect to AWS S3 "Failed to preprocess target Error: Insufficient AWS permissions"

0

Hello,

We're new to Veeam Cloud Connect sending tenant backups to S3 at AWS and we are testing currently. When the backup copy job goes to our cloud connect server which is just Veeam + the S3 repository added we see this error after some timeout job wont start without initial failure - "Failed to preprocess target Error: Insufficient AWS permissions"

We have in AWS configured the following:

-Role name "VeeamVCC" which has an attached policy named "VeeamVCC" and in this policy we have the following configuration:

{
	"Version": "2012-10-17",
	"Statement": [
		{
			"Sid": "SecureBucketPolicy0",
			"Effect": "Allow",
			"Action": [
				"s3:PutObject",
				"s3:GetObject",
				"s3:DeleteObject",
				"s3:GetBucketLocation",
				"s3:GetBucketVersioning",
				"s3:GetBucketObjectLockConfiguration",
				"s3:ListMultipartUploadParts",
				"s3:AbortMultipartUpload",
				"s3:ListBucketVersions"
			],
			"Resource": [
				"arn:aws:s3:::east1-vcc-test",
				"arn:aws:s3:::east1-vcc-test/*"
			]
		},
		{
			"Sid": "SecureBucketPolicy1",
			"Effect": "Allow",
			"Action": [
				"s3:ListAllMyBuckets",
				"s3:ListBucket"
			],
			"Resource": "*"
		},
		{
			"Sid": "AllowIAMUserCreation",
			"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"
			],
			"Resource": "arn:aws:iam::*:user/Veeam-*"
		}
	]
}

The error logging on Veeam side says:

<20>   Error (1)    Insufficient AWS permissions (System.Exception)
<20>   Error (1)    Server stack trace: 
<20>   Error (1)       at Veeam.Backup.AmazonAPI.SAmazonWebServiceExt.<>c__DisplayClass1_0`1.b__0()
<20>   Error (1)       at Veeam.Backup.AmazonAPI.SAmazonWebServiceExt.<>c__DisplayClass2_0`1.b__0()
<20>   Error (1)       at Veeam.Backup.Common.SFunctionExtensions.TryInvoke[TResult](Func`1 action, Int32 retryCount, TimeSpan timeout, Func`2 excFilter)
<20>   Error (1)    --- End of stack trace from previous location where exception was thrown ---
<20>   Error (1)       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
<20>   Error (1)       at Veeam.Backup.Common.SExceptionExtensions.Rethrow(Exception exception)
<20>   Error (1)       at Veeam.Backup.Common.SFunctionExtensions.TryInvoke[TResult](Func`1 action, Int32 retryCount, TimeSpan timeout, Func`2 excFilter)
<20>   Error (1)       at Veeam.Backup.AmazonAPI.SAwsInfrastructureExtensions.InternalTryInvokeAws[T](Func`1 func, Func`2 exceptionFilter)
<20>   Error (1)       at Veeam.Backup.AmazonAPI.CDefaultAwsUserManager.CreateUser(String userName, CAwsTagInfo[] tags)
<20>   Error (1)       at Veeam.Backup.PublicCloud.CAmazonS3BlobRepositoryLimitedCredentialsProvider.CreateNewLimitedCredentials(CObjectRepositoryClientId clientId, String accountDescription, Boolean readOnlyAccess)
<20>   Error (1)       at Veeam.Backup.PublicCloud.CAmazonS3BlobRepositoryLimitedCredentialsProvider.GetOrCreateLongTermInternal(CObjectRepositoryClientId clientId, String accountDescription, DateTime expiresOnUtc, Boolean readOnlyAccess)
<20>   Error (1)       at Veeam.Backup.PublicCloud.CAmazonS3BlobRepositoryLimitedCredentialsProvider.GetOrCreateCredentials(CObjectRepositoryClientId clientId, String accountDescription, DateTime expiresOnUtc, Boolean readOnlyAccess)
<20>   Error (1)       at Veeam.Backup.PublicCloud.CObjectStorageLimitedCredentialsResolver.GetCredentialsForAmazonS3Repository(IAmazonS3BlobRepository repository, CObjectRepositoryClientId clientId, String accountDescription, Boolean readOnlyAccess)
<20>   Error (1)       at Veeam.Backup.PublicCloud.CObjectStorageLimitedCredentialsResolver.GetCredentials(CObjectRepositoryClientId clientId, String accountName, Boolean readonlyAccess)
<20>   Error (1)       at Veeam.Backup.PublicCloud.SDirectRemoteObjectRepositoryHelper.GetDirectCredentials(IBackupRepository repository, CObjectRepositoryClientId clientId, String accountName, Boolean readonlyAccess)
<20>   Error (1)       at Veeam.Backup.PublicCloud.SDirectRemoteObjectRepositoryHelper.GetConnectionInfo(IBackupRepository repository, CObjectRepositoryClientId clientId, CPublicCloudClientDescription clientDescription, String accountName, Boolean readonlyAccess)
<20>   Error (1)       at Veeam.Backup.CloudService.CCloudServerSpecServiceInvoker.SessionExecuter.GetDirectObjectRepositoryConnectionInfo(CCloudServiceGetDirectObjectRepositoryConnectionInfo task)
<20>   Error (1)       at Veeam.Backup.CloudService.CCloudServerSpecServiceInvoker.GetDirectObjectRepositoryConnectionInfo()
<20>   Error (1)       at Veeam.Backup.CloudService.CCloudServerSpecServiceInvoker.Invoke(Int32 rawMethod)
<20>   Error (1)       at Veeam.Backup.CloudConnect.Components.CVccBackgroundRequestHandlingOperation.DoInternal()

We thought we have enough permissions on the policy and perhaps too much! But nevertheless enough for recommended in the Veeam KB: https://www.veeam.com/kb3151 Note: Non-immutable, we may do this later but testing with Immutability off for now.

The repo configured inside of Veeam for the S3 bucket is using a user we made called "veeam-vcc" Which has the policy mentioned earlier attached to it along with "AmazonS3FullAccess"

The user we created then had access key generated from it to be used with Veeam.

The customer's backup server - in case you are familiar with Veeam in your response is in "Direct Mode" so their backup server gets this config/assigned repo from our provider server "Cloud Connect Server" but transports directly between them and the S3 repo (not to us first then to S3).

Veeam is on the latest 12.3 if necessary to know both Veeam Cloud Connect server and Tenant's backup server.

We are waiting for an onboarding with a partner which can perhaps schedule us some support soon, just hoping someone can shed some light sooner while we are in testing. Thanks!

  • Best to check in CloudTrail on what permission is failing for the IAM user. Also, for the IAM user, why are you using a * for the account, better to use the needed AWS account id, otherwise, any account with similar IAM user can potentially access it. Also, check your S3 bucker policy in case permission needs to be added there.

asked 2 years ago726 views

1 Answer
0

Based on the information provided, it appears that the issue is related to insufficient AWS permissions for the Veeam Cloud Connect setup with Amazon S3. Here are some steps to troubleshoot and potentially resolve the issue:

  1. Review the IAM policy: The policy you've provided seems to be quite comprehensive, but there might be a few permissions missing. Ensure that the policy includes all necessary S3 actions, especially those related to multipart uploads and object versioning.

  2. Check the resource ARNs: Make sure the S3 bucket ARN in your policy matches exactly with the bucket you're trying to access. Double-check for any typos or discrepancies.

  3. Verify the IAM user: Confirm that the "veeam-vcc" user has the correct policy attached and that the access keys being used in Veeam are current and active.

  4. S3 bucket settings: Verify that the S3 bucket itself doesn't have any conflicting bucket policies or ACLs that might be denying access.

  5. CloudWatch metrics: Consider enabling S3 access logging or CloudTrail to get more detailed information about the access attempts and any specific permission issues.

  6. Veeam-specific permissions: Ensure that the IAM policy includes permissions for Veeam to create and manage its own IAM users (which it uses for limited-access operations). The policy you provided includes these permissions, but double-check that they're correctly applied.

  7. Region settings: Confirm that the AWS region settings in Veeam match the region where your S3 bucket is located.

  8. KMS permissions: If you're using AWS KMS for encryption, make sure the necessary KMS permissions are included in your IAM policy.

  9. Veeam service account: Verify that the Veeam service account running the Veeam services has the necessary local permissions to interact with AWS.

  10. Network connectivity: Ensure there are no network issues preventing Veeam from reaching AWS services.

If these steps don't resolve the issue, you may need to engage Veeam support for more in-depth troubleshooting. They can analyze logs and provide more specific guidance based on your exact configuration.
Sources
Unable to perform cloudwatch:GetMetricData job fails when backing up S3 with AWS Backup | AWS re:Post
Unable to perform upload to S3 bucket | AWS re:Post
Troubleshoot Transfer Family "Access Denied" or "Permission Denied" errors | AWS re:Post

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.