AmazonGuardDutyMalwareProtectionServiceRolePolicy
Summary
GuardDuty malware protection uses the service-linked role (SLR) named AWSServiceRoleForAmazonGuardDutyMalwareProtection. This service-linked role allows GuardDuty malware protection to perform agent-less scans to detect malware. It allows GuardDuty to create snapshots in your account, and share the snapshots with the GuardDuty service account to scan for malware. It evaluates these shared snapshots and includes the retrieved EC2 instance metadata in the GuardDuty Malware Protection findings. The AWSServiceRoleForAmazonGuardDutyMalwareProtection service-linked role trusts the malware-protection.guardduty.amazonaws.com service to assume the role.
Permissions imported from the AWS Managed Policy Reference Guide; other sections pending editorial review.
Identity
- ARN
arn:aws:iam::aws:policy/aws-service-role/AmazonGuardDutyMalwareProtectionServiceRolePolicy- Default version
- v2
- Created
- Last edited
- Services
- ebs, ec2, ecs, eks, kms, logs
Control-plane actions (22)
By access level: 8 List, 2 Permissions management, 3 Read, 1 Tagging, 8 Write.
| Service | Granted | Access levels and limits | Granted by |
|---|---|---|---|
| EC2 | 7 of 834 | 3 List, 1 Permissions management, 1 Tagging, 2 Write; 4 restricted, 4 conditional | ec2:CreateSnapshot, ec2:CreateTags, ec2:DeleteSnapshot, ec2:DescribeInstances, ec2:DescribeSnapshots, ec2:DescribeVolumes, ec2:ModifySnapshotAttribute |
| Elastic Container Service | 4 of 92 | 3 List, 1 Read; 0 restricted, 0 conditional | ecs:DescribeTasks, ecs:ListClusters, ecs:ListContainerInstances, ecs:ListTasks |
| EKS | 1 of 74 | 1 Read; 0 restricted, 0 conditional | eks:DescribeCluster |
| KMS | 4 of 58 | 1 Permissions management, 1 Read, 2 Write; 4 restricted, 3 conditional | kms:CreateGrant, kms:DescribeKey, kms:ReEncryptFrom, kms:ReEncryptTo |
| CloudWatch Logs | 6 of 133 | 2 List, 4 Write; 6 restricted, 0 conditional | logs:CreateLogGroup, logs:CreateLogStream, logs:DescribeLogGroups, logs:DescribeLogStreams, logs:PutLogEvents, logs:PutRetentionPolicy |
EC2: 7 actions
- ec2:CreateSnapshot (Write)
- ec2:CreateTags (Tagging)
- ec2:DeleteSnapshot (Write)
- ec2:DescribeInstances (List)
- ec2:DescribeSnapshots (List)
- ec2:DescribeVolumes (List)
- ec2:ModifySnapshotAttribute (Permissions management)
Elastic Container Service: 4 actions
- ecs:DescribeTasks (Read)
- ecs:ListClusters (List)
- ecs:ListContainerInstances (List)
- ecs:ListTasks (List)
EKS: 1 actions
- eks:DescribeCluster (Read)
KMS: 4 actions
- kms:CreateGrant (Permissions management)
- kms:DescribeKey (Read)
- kms:ReEncryptFrom (Write)
- kms:ReEncryptTo (Write)
CloudWatch Logs: 6 actions
- logs:CreateLogGroup (Write)
- logs:CreateLogStream (Write)
- logs:DescribeLogGroups (List)
- logs:DescribeLogStreams (List)
- logs:PutLogEvents (Write)
- logs:PutRetentionPolicy (Write)
Data-plane actions (2)
By access level: 2 Read.
| Service | Granted | Access levels and limits | Granted by |
|---|---|---|---|
| Elastic Block Store | 2 of 4 | 2 Read; 2 restricted, 2 conditional | ebs:GetSnapshotBlock, ebs:ListSnapshotBlocks |
Elastic Block Store: 2 actions
- ebs:GetSnapshotBlock (Read)
- ebs:ListSnapshotBlocks (Read)
Excluded and conditional actions
ec2:ModifySnapshotAttribute(deny-conditional, statement 6): 1 matching actions
Resource scope and attachment
Resource scope across granted actions: mixed.
Can be attached: No (service-linked role policy).
Why this tier
- Grants 11 write, tagging or permissions-management actions, short of full control of any service.
Guidance
Pending editorial review. The permission data on this page comes straight from AWS; this section will be filled in once a reviewed guide exists.
Related policies
Same service
- AdministratorAccess-AWSElasticBeanstalk
- AgentRegistryFullAccess
- AIDevOpsReleaseManagementVPCPolicy
- AlexaForBusinessGatewayExecution
- AmazonAPIGatewayPushToCloudWatchLogs
- AmazonAppFlowFullAccess
- AmazonAppStreamServiceAccess
- AmazonAuroraDSQLConsoleFullAccess
Same domain
Frequently asked questions
Pending editorial review. The permission data on this page comes straight from AWS; this section will be filled in once a reviewed guide exists.
Policy JSON
{
"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"
}
}
}
]
}
Version history
Current version v2, edited by AWS on 2024-01-25. Version history is recorded from 2026-11-11. Earlier versions are in the IAM console under Policy versions.
Attach snippets
This policy cannot be attached to users, groups or roles, so there are no attach snippets.
Sources
Pending editorial review. No editorial sources are listed yet.