Skip to main content
IAM Policy Map

AmazonInspector2AgentlessServiceRolePolicy

OperatorService-linked roleActivePermissions reviewedShow on mapCompare

Summary

Grants Amazon Inspector access to AWS services needed to perform agent-less security assessments

Permissions imported from the AWS Managed Policy Reference Guide; other sections pending editorial review.

Identity

ARN
arn:aws:iam::aws:policy/aws-service-role/AmazonInspector2AgentlessServiceRolePolicy
Default version
v2
Created
Last edited
Services
ebs, ec2, kms

Control-plane actions (9)

By access level: 4 List, 1 Read, 1 Tagging, 3 Write.

Control-plane actions by service
ServiceGrantedAccess levels and limitsGranted by
EC26 of 8343 List, 1 Tagging, 2 Write; 3 restricted, 2 conditionalec2:CreateSnapshots, ec2:CreateTags, ec2:DeleteSnapshot, ec2:DescribeInstances, ec2:DescribeSnapshots, ec2:DescribeVolumes
KMS3 of 581 List, 1 Read, 1 Write; 3 restricted, 2 conditionalkms:Decrypt, kms:DescribeKey, kms:ListResourceTags
EC2: 6 actions
  • ec2:CreateSnapshots (Write)
  • ec2:CreateTags (Tagging)
  • ec2:DeleteSnapshot (Write)
  • ec2:DescribeInstances (List)
  • ec2:DescribeSnapshots (List)
  • ec2:DescribeVolumes (List)
KMS: 3 actions
  • kms:Decrypt (Write)
  • kms:DescribeKey (Read)
  • kms:ListResourceTags (List)

Data-plane actions (2)

By access level: 2 Read.

Data-plane actions by service
ServiceGrantedAccess levels and limitsGranted by
Elastic Block Store2 of 42 Read; 2 restricted, 2 conditionalebs:GetSnapshotBlock, ebs:ListSnapshotBlocks
Elastic Block Store: 2 actions
  • ebs:GetSnapshotBlock (Read)
  • ebs:ListSnapshotBlocks (Read)

Excluded and conditional actions

  • ec2:CreateSnapshots (deny-conditional, statement 3): 1 matching actions
  • kms:Decrypt (deny-conditional, statement 7): 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 4 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.

Same service

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

Download policy.json

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "InstanceIdentification",
      "Effect": "Allow",
      "Action": [
        "ec2:DescribeInstances",
        "ec2:DescribeVolumes",
        "ec2:DescribeSnapshots"
      ],
      "Resource": "*"
    },
    {
      "Sid": "GetSnapshotData",
      "Effect": "Allow",
      "Action": [
        "ebs:ListSnapshotBlocks",
        "ebs:GetSnapshotBlock"
      ],
      "Resource": "arn:aws:ec2:*:*:snapshot/*",
      "Condition": {
        "StringLike": {
          "aws:ResourceTag/InspectorScan": "*"
        }
      }
    },
    {
      "Sid": "CreateSnapshotsAnyInstanceOrVolume",
      "Effect": "Allow",
      "Action": "ec2:CreateSnapshots",
      "Resource": [
        "arn:aws:ec2:*:*:instance/*",
        "arn:aws:ec2:*:*:volume/*"
      ]
    },
    {
      "Sid": "DenyCreateSnapshotsOnExcludedInstances",
      "Effect": "Deny",
      "Action": "ec2:CreateSnapshots",
      "Resource": "arn:aws:ec2:*:*:instance/*",
      "Condition": {
        "StringEquals": {
          "ec2:ResourceTag/InspectorEc2Exclusion": "true"
        }
      }
    },
    {
      "Sid": "CreateSnapshotsOnAnySnapshotOnlyWithTag",
      "Effect": "Allow",
      "Action": "ec2:CreateSnapshots",
      "Resource": "arn:aws:ec2:*:*:snapshot/*",
      "Condition": {
        "Null": {
          "aws:TagKeys": "false"
        },
        "ForAllValues:StringEquals": {
          "aws:TagKeys": "InspectorScan"
        }
      }
    },
    {
      "Sid": "CreateOnlyInspectorScanTagOnlyUsingCreateSnapshots",
      "Effect": "Allow",
      "Action": "ec2:CreateTags",
      "Resource": "arn:aws:ec2:*:*:snapshot/*",
      "Condition": {
        "StringLike": {
          "ec2:CreateAction": "CreateSnapshots"
        },
        "Null": {
          "aws:TagKeys": "false"
        },
        "ForAllValues:StringEquals": {
          "aws:TagKeys": "InspectorScan"
        }
      }
    },
    {
      "Sid": "DeleteOnlySnapshotsTaggedForScanning",
      "Effect": "Allow",
      "Action": "ec2:DeleteSnapshot",
      "Resource": "arn:aws:ec2:*:*:snapshot/*",
      "Condition": {
        "StringLike": {
          "ec2:ResourceTag/InspectorScan": "*"
        }
      }
    },
    {
      "Sid": "DenyKmsDecryptForExcludedKeys",
      "Effect": "Deny",
      "Action": "kms:Decrypt",
      "Resource": "arn:aws:kms:*:*:key/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceTag/InspectorEc2Exclusion": "true"
        }
      }
    },
    {
      "Sid": "DecryptSnapshotBlocksVolContext",
      "Effect": "Allow",
      "Action": "kms:Decrypt",
      "Resource": "arn:aws:kms:*:*:key/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        },
        "StringLike": {
          "kms:ViaService": "ec2.*.amazonaws.com",
          "kms:EncryptionContext:aws:ebs:id": "vol-*"
        }
      }
    },
    {
      "Sid": "DecryptSnapshotBlocksSnapContext",
      "Effect": "Allow",
      "Action": "kms:Decrypt",
      "Resource": "arn:aws:kms:*:*:key/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        },
        "StringLike": {
          "kms:ViaService": "ec2.*.amazonaws.com",
          "kms:EncryptionContext:aws:ebs:id": "snap-*"
        }
      }
    },
    {
      "Sid": "DescribeKeysForEbsOperations",
      "Effect": "Allow",
      "Action": "kms:DescribeKey",
      "Resource": "arn:aws:kms:*:*:key/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        },
        "StringLike": {
          "kms:ViaService": "ec2.*.amazonaws.com"
        }
      }
    },
    {
      "Sid": "DecryptCrossAccountOrgVolContext",
      "Effect": "Allow",
      "Action": "kms:Decrypt",
      "Resource": "arn:aws:kms:*:*:key/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceOrgID": "${aws:PrincipalOrgID}"
        },
        "StringLike": {
          "kms:ViaService": "ec2.*.amazonaws.com",
          "kms:EncryptionContext:aws:ebs:id": "vol-*"
        }
      }
    },
    {
      "Sid": "DecryptCrossAccountOrgSnapContext",
      "Effect": "Allow",
      "Action": "kms:Decrypt",
      "Resource": "arn:aws:kms:*:*:key/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceOrgID": "${aws:PrincipalOrgID}"
        },
        "StringLike": {
          "kms:ViaService": "ec2.*.amazonaws.com",
          "kms:EncryptionContext:aws:ebs:id": "snap-*"
        }
      }
    },
    {
      "Sid": "DescribeCrossAccountOrgKeysForEbsOperations",
      "Effect": "Allow",
      "Action": "kms:DescribeKey",
      "Resource": "arn:aws:kms:*:*:key/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceOrgID": "${aws:PrincipalOrgID}"
        },
        "StringLike": {
          "kms:ViaService": "ec2.*.amazonaws.com"
        }
      }
    },
    {
      "Sid": "ListKeyResourceTags",
      "Effect": "Allow",
      "Action": "kms:ListResourceTags",
      "Resource": "arn:aws:kms:*:*:key/*"
    }
  ]
}

Version history

Current version v2, edited by AWS on 2026-08-20. 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.