AmazonGuardDutyMalwareProtectionServiceRolePolicy
Last Modified
Mar 12, 2026
March 12, 2026 at 09:27 PM UTC
Version
v2
Total Versions
2
Created
Jan 25, 2024
Actions
27
Risk
no risk signalRead from this policy document alone: trust policies, boundaries and SCPs in your account still decide what actually succeeds. How this is assessed
IAM Access Analyzer (3)
- Suggestion / EQUIVALENT_TO_NULL_FALSE
We recommend replacing the key ec2:ResourceTag/GuardDutyScanId in the condition block of StringLike with {ec2:ResourceTag/GuardDutyScanId: false} to ensure better enforcement of the condition. AWS docs
- Suggestion / EQUIVALENT_TO_NULL_FALSE
We recommend replacing the key ec2:ResourceTag/GuardDutyScanId in the condition block of StringLike with {ec2:ResourceTag/GuardDutyScanId: false} to ensure better enforcement of the condition. AWS docs
- Suggestion / EQUIVALENT_TO_NULL_FALSE
We recommend replacing the key aws:ResourceTag/GuardDutyScanId in the condition block of StringLike with {aws:ResourceTag/GuardDutyScanId: false} to ensure better enforcement of the condition. AWS docs
Policy Document
View on GitHub{
"PolicyVersion": {
"Document": {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DescribeAndListPermissions",
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances",
"ec2:DescribeVolumes",
"ec2:DescribeSnapshots",
"ecs:ListClusters",
"ecs:ListContainerInstances",
"ecs:ListTasks",
"ecs:DescribeTasks",
"eks:DescribeCluster"
],
"Resource": "*"
},
{
"Sid": "CreateSnapshotVolumeConditionalStatement",
"Effect": "Allow",
"Action": "ec2:CreateSnapshot",
"Resource": "arn:aws:ec2:*:*:volume/*",
"Condition": {
"Null": {
"aws:ResourceTag/GuardDutyExcluded": "true"
}
}
},
{
"Sid": "CreateSnapshotConditionalStatement",
"Effect": "Allow",
"Action": "ec2:CreateSnapshot",
"Resource": "arn:aws:ec2:*:*:snapshot/*",
"Condition": {
"ForAnyValue:StringEquals": {
"aws:TagKeys": "GuardDutyScanId"
}
}
},
{
"Sid": "CreateTagsPermission",
"Effect": "Allow",
"Action": "ec2:CreateTags",
"Resource": "arn:aws:ec2:*:*:*/*",
"Condition": {
"StringEquals": {
"ec2:CreateAction": "CreateSnapshot"
}
}
},
{
"Sid": "AddTagsToSnapshotPermission",
"Effect": "Allow",
"Action": "ec2:CreateTags",
"Resource": "arn:aws:ec2:*:*:snapshot/*",
"Condition": {
"StringLike": {
"ec2:ResourceTag/GuardDutyScanId": "*"
},
"ForAllValues:StringEquals": {
"aws:TagKeys": [
"GuardDutyExcluded",
"GuardDutyFindingDetected"
]
}
}
},
{
"Sid": "DeleteAndShareSnapshotPermission",
"Effect": "Allow",
"Action": [
"ec2:DeleteSnapshot",
"ec2:ModifySnapshotAttribute"
],
"Resource": "arn:aws:ec2:*:*:snapshot/*",
"Condition": {
"StringLike": {
"ec2:ResourceTag/GuardDutyScanId": "*"
},
"Null": {
"aws:ResourceTag/GuardDutyExcluded": "true"
}
}
},
{
"Sid": "PreventPublicAccessToSnapshotPermission",
"Effect": "Deny",
"Action": [
"ec2:ModifySnapshotAttribute"
],
"Resource": "arn:aws:ec2:*:*:snapshot/*",
"Condition": {
"StringEquals": {
"ec2:Add/group": "all"
}
}
},
{
"Sid": "CreateGrantPermission",
"Effect": "Allow",
"Action": "kms:CreateGrant",
"Resource": "arn:aws:kms:*:*:key/*",
"Condition": {
"Null": {
"aws:ResourceTag/GuardDutyExcluded": "true"
},
"StringLike": {
"kms:EncryptionContext:aws:ebs:id": "snap-*"
},
"ForAllValues:StringEquals": {
"kms:GrantOperations": [
"Decrypt",
"CreateGrant",
"GenerateDataKeyWithoutPlaintext",
"ReEncryptFrom",
"ReEncryptTo",
"RetireGrant",
"DescribeKey"
]
},
"Bool": {
"kms:GrantIsForAWSResource": "true"
}
}
},
{
"Sid": "ShareSnapshotKMSPermission",
"Effect": "Allow",
"Action": [
"kms:ReEncryptTo",
"kms:ReEncryptFrom"
],
"Resource": "arn:aws:kms:*:*:key/*",
"Condition": {
"StringLike": {
"kms:ViaService": "ec2.*.amazonaws.com"
},
"Null": {
"aws:ResourceTag/GuardDutyExcluded": "true"
}
}
},
{
"Sid": "DescribeKeyPermission",
"Effect": "Allow",
"Action": "kms:DescribeKey",
"Resource": "arn:aws:kms:*:*:key/*"
},
{
"Sid": "GuardDutyLogGroupPermission",
"Effect": "Allow",
"Action": [
"logs:DescribeLogGroups",
"logs:CreateLogGroup",
"logs:PutRetentionPolicy"
],
"Resource": "arn:aws:logs:*:*:log-group:/aws/guardduty/*"
},
{
"Sid": "GuardDutyLogStreamPermission",
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents",
"logs:DescribeLogStreams"
],
"Resource": "arn:aws:logs:*:*:log-group:/aws/guardduty/*:log-stream:*"
},
{
"Sid": "EBSDirectAPIPermissions",
"Effect": "Allow",
"Action": [
"ebs:GetSnapshotBlock",
"ebs:ListSnapshotBlocks"
],
"Resource": "arn:aws:ec2:*:*:snapshot/*",
"Condition": {
"StringLike": {
"aws:ResourceTag/GuardDutyScanId": "*"
},
"Null": {
"aws:ResourceTag/GuardDutyExcluded": "true"
}
}
}
]
},
"VersionId": "v2",
"IsDefaultVersion": true,
"CreateDate": "2024-01-25T22:24:00+00:00"
}
}Version History (5 recorded)
Raw historyAmazonGuardDutyMalwareProtectionServiceRolePolicy - Policy Version v2
No recorded action delta - this version predates the change index. View the raw diff.
Mar 12, 2026
f374d06Update detected
No recorded action delta - this version predates the change index. View the raw diff.
Sep 18, 2024
aafbae9Update detected
No recorded action delta - this version predates the change index. View the raw diff.
May 13, 2024
1b36617Update detected
No recorded action delta - this version predates the change index. View the raw diff.
Jan 25, 2024
830d4ffUpdate detected
No recorded action delta - this version predates the change index. View the raw diff.
Jul 19, 2022
8518b1c