AWS datasync medium security documentation change
Summary
Restructured IAM permissions with resource constraints and conditional policies for cross-account access
Security assessment
Added granular resource ARN restrictions and policy attachment conditions to follow least-privilege principles, reducing potential over-permissioning risks in cross-account scenarios.
Diff
diff --git a/datasync/latest/userguide/s3-cross-account-transfer.md b/datasync/latest/userguide/s3-cross-account-transfer.md index c9828e0b8..cce179e61 100644 --- a//datasync/latest/userguide/s3-cross-account-transfer.md +++ b//datasync/latest/userguide/s3-cross-account-transfer.md @@ -67,4 +66,0 @@ In your source account, add at least the following permissions to an IAM role fo - "iam:CreateRole", - "iam:CreatePolicy", - "iam:AttachRolePolicy", - "iam:ListRoles", @@ -75,0 +72,27 @@ In your source account, add at least the following permissions to an IAM role fo + { + "Sid": "IAMPermissions", + "Effect": "Allow", + "Action": [ + "iam:CreateRole", + "iam:ListRoles", + "iam:CreatePolicy" + ], + "Resource": "arn:aws:iam::111122223333:role/DataSync-*" + }, + { + "Sid": "IAMAttachRolePermissions", + "Effect": "Allow", + "Action": [ + "iam:AttachRolePolicy" + ], + "Resource": "arn:aws:iam::111122223333:role/DataSync-*", + "Condition": { + "ArnLike": { + "iam:PolicyARN": [ + "arn:aws:iam::111122223333:policy/DataSync-*", + "arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess", + "arn:aws:iam::aws:policy/service-role/AWSDataSyncFullAccess" + ] + } + } + },