AmazonInspector2ServiceRolePolicy
Last Modified
Jun 16, 2026
June 16, 2026 at 08:03 PM UTC
Version
v27
Total Versions
22
Created
Jun 16, 2026
Actions
128
Risk
HighAn unrestricted escalation path, identity administration, secret reads or the power to switch off security monitoring. Read from this policy document alone: trust policies, boundaries and SCPs in your account still decide what actually succeeds. How this is assessed
- High
Can switch off security monitoring
Can disable Inspector, which is how an intruder hides.
inspector2:DisableUse with caution: Deny these actions with an SCP for everyone outside a break-glass role, so no single policy can blind you.
- Medium
Can take over existing resources that run as another role
Grants the actions of 1 documented escalation path, but only on named resources or under a condition. Review that scope before trusting it.
- ssm:SendCommand: on arn:aws:ssm:*:*:document/AmazonInspector2-InvokeInspectorSsmPluginCIS
Use with caution: Check which roles, users or policies fall inside the scope shown above. Within it the escalation works as documented, so keep privileged principals out of it.
Policy Document
View on GitHub{
"PolicyVersion": {
"Document": {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "TirosPolicy",
"Effect": "Allow",
"Action": [
"directconnect:DescribeConnections",
"directconnect:DescribeDirectConnectGatewayAssociations",
"directconnect:DescribeDirectConnectGatewayAttachments",
"directconnect:DescribeDirectConnectGateways",
"directconnect:DescribeVirtualGateways",
"directconnect:DescribeVirtualInterfaces",
"ec2:DescribeAddresses",
"ec2:DescribeAvailabilityZones",
"ec2:DescribeCustomerGateways",
"ec2:DescribeEgressOnlyInternetGateways",
"ec2:DescribeInstances",
"ec2:DescribeInternetGateways",
"ec2:DescribeManagedPrefixLists",
"ec2:DescribeNatGateways",
"ec2:DescribeNetworkAcls",
"ec2:DescribeNetworkInterfaces",
"ec2:DescribePrefixLists",
"ec2:DescribeRegions",
"ec2:DescribeRouteTables",
"ec2:DescribeSecurityGroups",
"ec2:DescribeSubnets",
"ec2:DescribeTransitGatewayAttachments",
"ec2:DescribeTransitGatewayConnects",
"ec2:DescribeTransitGatewayPeeringAttachments",
"ec2:DescribeTransitGatewayPolicyTables",
"ec2:DescribeTransitGatewayRouteTables",
"ec2:DescribeTransitGatewayVpcAttachments",
"ec2:DescribeTransitGateways",
"ec2:DescribeVpcEndpointServiceConfigurations",
"ec2:DescribeVpcEndpoints",
"ec2:DescribeVpcPeeringConnections",
"ec2:DescribeVpcs",
"ec2:DescribeVpnConnections",
"ec2:DescribeVpnGateways",
"ec2:GetManagedPrefixListEntries",
"ec2:GetSecurityGroupsForVpc",
"ec2:GetTransitGatewayPolicyTableAssociations",
"ec2:GetTransitGatewayPolicyTableEntries",
"ec2:GetTransitGatewayRouteTablePropagations",
"ec2:SearchTransitGatewayRoutes",
"elasticloadbalancing:DescribeListeners",
"elasticloadbalancing:DescribeLoadBalancerAttributes",
"elasticloadbalancing:DescribeLoadBalancers",
"elasticloadbalancing:DescribeRules",
"elasticloadbalancing:DescribeTags",
"elasticloadbalancing:DescribeTargetGroups",
"elasticloadbalancing:DescribeTargetGroupAttributes",
"elasticloadbalancing:DescribeTargetHealth",
"network-firewall:DescribeFirewall",
"network-firewall:DescribeFirewallMetadata",
"network-firewall:DescribeFirewallPolicy",
"network-firewall:DescribeResourcePolicy",
"network-firewall:DescribeRuleGroup",
"network-firewall:ListFirewallPolicies",
"network-firewall:ListFirewalls",
"network-firewall:ListRuleGroups",
"tiros:CreateQuery",
"tiros:GetQueryAnswer"
],
"Resource": [
"*"
]
},
{
"Sid": "PackageVulnerabilityScanning",
"Effect": "Allow",
"Action": [
"ecr:BatchGetImage",
"ecr:BatchGetRepositoryScanningConfiguration",
"ecr:DescribeImages",
"ecr:DescribeRegistry",
"ecr:DescribeRepositories",
"ecr:GetAuthorizationToken",
"ecr:GetDownloadUrlForLayer",
"ecr:GetRegistryScanningConfiguration",
"ecr:ListImages",
"ecr:PutRegistryScanningConfiguration",
"organizations:DescribeAccount",
"organizations:DescribeOrganization",
"organizations:ListAccounts",
"ssm:DescribeAssociation",
"ssm:DescribeAssociationExecutions",
"ssm:DescribeInstanceInformation",
"ssm:ListAssociations",
"ssm:ListResourceDataSync"
],
"Resource": "*"
},
{
"Sid": "LambdaPackageVulnerabilityScanning",
"Effect": "Allow",
"Action": [
"lambda:ListFunctions",
"lambda:GetFunction",
"lambda:GetLayerVersion",
"lambda:ListTags",
"cloudwatch:GetMetricData"
],
"Resource": "*"
},
{
"Sid": "GatherInventory",
"Effect": "Allow",
"Action": [
"ssm:CreateAssociation",
"ssm:StartAssociationsOnce",
"ssm:UpdateAssociation"
],
"Resource": [
"arn:aws:ec2:*:*:instance/*",
"arn:aws:ssm:*:*:document/AWS-ConfigureAWSPackage",
"arn:aws:ssm:*:*:document/AmazonInspector2-*",
"arn:aws:ssm:*:*:document/AWS-GatherSoftwareInventory",
"arn:aws:ssm:*:*:managed-instance/*",
"arn:aws:ssm:*:*:association/*"
]
},
{
"Sid": "GatherInventoryDeleteAssociation",
"Effect": "Allow",
"Action": [
"ssm:DeleteAssociation"
],
"Resource": [
"arn:aws:ssm:*:*:association/*"
]
},
{
"Sid": "DataSyncCleanup",
"Effect": "Allow",
"Action": [
"ssm:CreateResourceDataSync",
"ssm:DeleteResourceDataSync"
],
"Resource": [
"arn:aws:ssm:*:*:resource-data-sync/InspectorResourceDataSync-do-not-delete"
]
},
{
"Sid": "ManagedRules",
"Effect": "Allow",
"Action": [
"events:PutRule",
"events:DeleteRule",
"events:DescribeRule",
"events:ListTargetsByRule",
"events:PutTargets",
"events:RemoveTargets"
],
"Resource": [
"arn:aws:events:*:*:rule/DO-NOT-DELETE-AmazonInspector*ManagedRule"
]
},
{
"Sid": "LambdaCodeVulnerabilityScanning",
"Effect": "Allow",
"Action": [
"codeguru-security:CreateScan",
"codeguru-security:GetAccountConfiguration",
"codeguru-security:GetFindings",
"codeguru-security:GetScan",
"codeguru-security:ListFindings",
"codeguru-security:BatchGetFindings",
"codeguru-security:DeleteScansByCategory"
],
"Resource": [
"*"
]
},
{
"Sid": "CodeGuruCodeVulnerabilityScanning",
"Effect": "Allow",
"Action": [
"iam:GetRole",
"iam:GetRolePolicy",
"iam:GetPolicy",
"iam:GetPolicyVersion",
"iam:ListAttachedRolePolicies",
"iam:ListPolicies",
"iam:ListPolicyVersions",
"iam:ListRolePolicies",
"lambda:ListVersionsByFunction"
],
"Resource": [
"*"
],
"Condition": {
"ForAnyValue:StringEquals": {
"aws:CalledVia": [
"codeguru-security.amazonaws.com"
]
}
}
},
{
"Sid": "Ec2DeepInspection",
"Effect": "Allow",
"Action": [
"ssm:PutParameter",
"ssm:GetParameters",
"ssm:DeleteParameter"
],
"Resource": [
"arn:aws:ssm:*:*:parameter/inspector-aws/service/inspector-linux-application-paths"
],
"Condition": {
"StringEquals": {
"aws:ResourceAccount": "${aws:PrincipalAccount}"
}
}
},
{
"Sid": "AllowManagementOfServiceLinkedChannel",
"Effect": "Allow",
"Action": [
"cloudtrail:CreateServiceLinkedChannel",
"cloudtrail:DeleteServiceLinkedChannel"
],
"Resource": [
"arn:aws:cloudtrail:*:*:channel/aws-service-channel/inspector2/*"
],
"Condition": {
"StringEquals": {
"aws:ResourceAccount": "${aws:PrincipalAccount}"
}
}
},
{
"Sid": "AllowListServiceLinkedChannels",
"Effect": "Allow",
"Action": [
"cloudtrail:ListServiceLinkedChannels"
],
"Resource": [
"*"
],
"Condition": {
"StringEquals": {
"aws:ResourceAccount": "${aws:PrincipalAccount}"
}
}
},
{
"Sid": "AllowToRunInvokeCisSpecificDocuments",
"Effect": "Allow",
"Action": [
"ssm:SendCommand",
"ssm:GetCommandInvocation"
],
"Resource": [
"arn:aws:ssm:*:*:document/AmazonInspector2-InvokeInspectorSsmPluginCIS"
]
},
{
"Sid": "AllowToRunCisCommandsToSpecificResources",
"Effect": "Allow",
"Action": [
"ssm:SendCommand"
],
"Resource": [
"arn:aws:ec2:*:*:instance/*"
],
"Condition": {
"StringEquals": {
"aws:ResourceAccount": "${aws:PrincipalAccount}"
}
}
},
{
"Sid": "AllowToPutCloudwatchMetricData",
"Effect": "Allow",
"Action": [
"cloudwatch:PutMetricData"
],
"Resource": [
"*"
],
"Condition": {
"StringEquals": {
"cloudwatch:namespace": "AWS/Inspector2"
}
}
},
{
"Sid": "AllowListAccessToECSAndEKS",
"Effect": "Allow",
"Action": [
"ecs:ListClusters",
"ecs:ListTasks",
"eks:ListClusters"
],
"Resource": [
"*"
],
"Condition": {
"StringEquals": {
"aws:ResourceAccount": "${aws:PrincipalAccount}"
}
}
},
{
"Sid": "AllowAccessToECSTasks",
"Effect": "Allow",
"Action": [
"ecs:DescribeTasks"
],
"Resource": "arn:aws:ecs:*:*:task/*",
"Condition": {
"StringEquals": {
"aws:ResourceAccount": "${aws:PrincipalAccount}"
}
}
},
{
"Sid": "AllowInspectorEnablementForAwsOrgPolicy",
"Effect": "Allow",
"Action": [
"inspector2:Enable",
"inspector2:Disable",
"inspector2:EnableDelegatedAdminAccount",
"inspector2:AssociateMember"
],
"Resource": "*"
},
{
"Sid": "AllowInspectorServiceDelegatedAdminFromAwsOrg",
"Effect": "Allow",
"Action": [
"organizations:ListDelegatedAdministrators"
],
"Resource": "*",
"Condition": {
"StringLikeIfExists": {
"organizations:ServicePrincipal": [
"agentless.inspector2.amazonaws.com",
"inspector2.amazonaws.com"
]
}
}
}
]
},
"VersionId": "v27",
"IsDefaultVersion": true,
"CreateDate": "2026-06-16T19:27:15+00:00"
}
}Version History (27 recorded)
Raw history4 actions added
AmazonInspector2ServiceRolePolicy - Policy Version v26
No recorded action delta - this version predates the change index. View the raw diff.
Mar 12, 2026
29fb144AmazonInspector2ServiceRolePolicy - Policy Version v26
No recorded action delta - this version predates the change index. View the raw diff.
Feb 13, 2026
7a6de08AmazonInspector2ServiceRolePolicy - Policy Version v25
No recorded action delta - this version predates the change index. View the raw diff.
Feb 12, 2026
20508fcAmazonInspector2ServiceRolePolicy - Policy Version v21
No recorded action delta - this version predates the change index. View the raw diff.
Feb 12, 2026
be4a581AmazonInspector2ServiceRolePolicy - Policy Version v17
No recorded action delta - this version predates the change index. View the raw diff.
Nov 10, 2025
6d65f41Update detected
No recorded action delta - this version predates the change index. View the raw diff.
Apr 29, 2025
550bd2aUpdate detected
No recorded action delta - this version predates the change index. View the raw diff.
Mar 28, 2025
280fd15Update detected
No recorded action delta - this version predates the change index. View the raw diff.
Mar 24, 2025
6bb3b94Update 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.
Aug 14, 2024
6b621dfUpdate detected
No recorded action delta - this version predates the change index. View the raw diff.
Aug 14, 2024
64642ceUpdate 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 22, 2024
7e8a8efUpdate detected
No recorded action delta - this version predates the change index. View the raw diff.
Jan 22, 2024
b61e9e5Update detected
No recorded action delta - this version predates the change index. View the raw diff.
Sep 7, 2023
5568e83Update detected
No recorded action delta - this version predates the change index. View the raw diff.
May 31, 2023
8bb5351Update detected
No recorded action delta - this version predates the change index. View the raw diff.
Apr 28, 2023
773ae95Update detected
No recorded action delta - this version predates the change index. View the raw diff.
Apr 14, 2023
5e91e58Update detected
No recorded action delta - this version predates the change index. View the raw diff.
Feb 24, 2023
f987772