AmazonInspector2ServiceRolePolicy
Summary
Grants Amazon Inspector access to AWS services needed to perform 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/AmazonInspector2ServiceRolePolicy- Default version
- v27
- Created
- Last edited
- Services
- cloudtrail, cloudwatch, codeguru-security, directconnect, ec2, ecr, ecs, eks, elasticloadbalancing, events, iam, inspector2, lambda, network-firewall, organizations, ssm, tiros
Control-plane actions (125)
By access level: 55 List, 47 Read, 23 Write.
| Service | Granted | Access levels and limits | Granted by |
|---|---|---|---|
| CloudTrail | 3 of 66 | 1 List, 2 Write; 3 restricted, 3 conditional | cloudtrail:CreateServiceLinkedChannel, cloudtrail:DeleteServiceLinkedChannel, cloudtrail:ListServiceLinkedChannels |
| CodeGuru Security | 7 of 15 | 2 List, 3 Read, 2 Write; 0 restricted, 0 conditional | codeguru-security:BatchGetFindings, codeguru-security:CreateScan, codeguru-security:DeleteScansByCategory, codeguru-security:GetAccountConfiguration, codeguru-security:GetFindings, codeguru-security:GetScan, codeguru-security:ListFindings |
| Direct Connect | 6 of 73 | 6 Read; 0 restricted, 0 conditional | directconnect:DescribeConnections, directconnect:DescribeDirectConnectGatewayAssociations, directconnect:DescribeDirectConnectGatewayAttachments, directconnect:DescribeDirectConnectGateways, directconnect:DescribeVirtualGateways, directconnect:DescribeVirtualInterfaces |
| EC2 | 34 of 834 | 32 List, 2 Read; 0 restricted, 0 conditional | ec2:DescribeAddresses, ec2:DescribeAvailabilityZones, ec2:DescribeCustomerGateways, ec2:DescribeEgressOnlyInternetGateways, ec2:DescribeInstances, ec2:DescribeInternetGateways, ec2:DescribeManagedPrefixLists, ec2:DescribeNatGateways, ec2:DescribeNetworkAcls, ec2:DescribeNetworkInterfaces, ec2:DescribePrefixLists, ec2:DescribeRegions and 22 more |
| Elastic Container Registry | 10 of 65 | 2 List, 7 Read, 1 Write; 0 restricted, 0 conditional | ecr:BatchGetImage, ecr:BatchGetRepositoryScanningConfiguration, ecr:DescribeImages, ecr:DescribeRegistry, ecr:DescribeRepositories, ecr:GetAuthorizationToken, ecr:GetDownloadUrlForLayer, ecr:GetRegistryScanningConfiguration, ecr:ListImages, ecr:PutRegistryScanningConfiguration |
| Elastic Container Service | 3 of 92 | 2 List, 1 Read; 3 restricted, 3 conditional | ecs:DescribeTasks, ecs:ListClusters, ecs:ListTasks |
| EKS | 1 of 74 | 1 List; 1 restricted, 1 conditional | eks:ListClusters |
| ELB | 8 of 77 | 1 List, 7 Read; 0 restricted, 0 conditional | elasticloadbalancing:DescribeListeners, elasticloadbalancing:DescribeLoadBalancerAttributes, elasticloadbalancing:DescribeLoadBalancers, elasticloadbalancing:DescribeRules, elasticloadbalancing:DescribeTags, elasticloadbalancing:DescribeTargetGroupAttributes, elasticloadbalancing:DescribeTargetGroups, elasticloadbalancing:DescribeTargetHealth |
| EventBridge | 6 of 71 | 1 List, 1 Read, 4 Write; 6 restricted, 0 conditional | events:DeleteRule, events:DescribeRule, events:ListTargetsByRule, events:PutRule, events:PutTargets, events:RemoveTargets |
| IAM | 8 of 190 | 4 List, 4 Read; 8 restricted, 8 conditional | iam:GetPolicy, iam:GetPolicyVersion, iam:GetRole, iam:GetRolePolicy, iam:ListAttachedRolePolicies, iam:ListPolicies, iam:ListPolicyVersions, iam:ListRolePolicies |
| Inspector2 | 4 of 84 | 4 Write; 0 restricted, 0 conditional | inspector2:AssociateMember, inspector2:Disable, inspector2:Enable, inspector2:EnableDelegatedAdminAccount |
| Lambda | 5 of 121 | 2 List, 3 Read; 1 restricted, 1 conditional | lambda:GetFunction, lambda:GetLayerVersion, lambda:ListFunctions, lambda:ListTags, lambda:ListVersionsByFunction |
| Network Firewall | 8 of 89 | 3 List, 5 Read; 0 restricted, 0 conditional | network-firewall:DescribeFirewall, network-firewall:DescribeFirewallMetadata, network-firewall:DescribeFirewallPolicy, network-firewall:DescribeResourcePolicy, network-firewall:DescribeRuleGroup, network-firewall:ListFirewallPolicies, network-firewall:ListFirewalls, network-firewall:ListRuleGroups |
| Organizations | 4 of 63 | 2 List, 2 Read; 1 restricted, 1 conditional | organizations:DescribeAccount, organizations:DescribeOrganization, organizations:ListAccounts, organizations:ListDelegatedAdministrators |
| Systems Manager | 16 of 164 | 2 List, 5 Read, 9 Write; 11 restricted, 3 conditional | ssm:CreateAssociation, ssm:CreateResourceDataSync, ssm:DeleteAssociation, ssm:DeleteParameter, ssm:DeleteResourceDataSync, ssm:DescribeAssociation, ssm:DescribeAssociationExecutions, ssm:DescribeInstanceInformation, ssm:GetCommandInvocation, ssm:GetParameters, ssm:ListAssociations, ssm:ListResourceDataSync and 4 more |
| Tiros | 2 of 5 | 1 Read, 1 Write; 0 restricted, 0 conditional | tiros:CreateQuery, tiros:GetQueryAnswer |
CloudTrail: 3 actions
- cloudtrail:CreateServiceLinkedChannel (Write)
- cloudtrail:DeleteServiceLinkedChannel (Write)
- cloudtrail:ListServiceLinkedChannels (List)
CodeGuru Security: 7 actions
- codeguru-security:BatchGetFindings (Read)
- codeguru-security:CreateScan (Write)
- codeguru-security:DeleteScansByCategory (Write)
- codeguru-security:GetAccountConfiguration (Read)
- codeguru-security:GetFindings (List)
- codeguru-security:GetScan (Read)
- codeguru-security:ListFindings (List)
Direct Connect: 6 actions
- directconnect:DescribeConnections (Read)
- directconnect:DescribeDirectConnectGatewayAssociations (Read)
- directconnect:DescribeDirectConnectGatewayAttachments (Read)
- directconnect:DescribeDirectConnectGateways (Read)
- directconnect:DescribeVirtualGateways (Read)
- directconnect:DescribeVirtualInterfaces (Read)
EC2: 34 actions
- ec2:DescribeAddresses (List)
- ec2:DescribeAvailabilityZones (List)
- ec2:DescribeCustomerGateways (List)
- ec2:DescribeEgressOnlyInternetGateways (List)
- ec2:DescribeInstances (List)
- ec2:DescribeInternetGateways (List)
- ec2:DescribeManagedPrefixLists (List)
- ec2:DescribeNatGateways (List)
- ec2:DescribeNetworkAcls (List)
- ec2:DescribeNetworkInterfaces (List)
- ec2:DescribePrefixLists (List)
- ec2:DescribeRegions (List)
- ec2:DescribeRouteTables (List)
- ec2:DescribeSecurityGroups (List)
- ec2:DescribeSubnets (List)
- ec2:DescribeTransitGatewayAttachments (List)
- ec2:DescribeTransitGatewayConnects (List)
- ec2:DescribeTransitGatewayPeeringAttachments (List)
- ec2:DescribeTransitGatewayPolicyTables (List)
- ec2:DescribeTransitGatewayRouteTables (List)
- ec2:DescribeTransitGatewayVpcAttachments (List)
- ec2:DescribeTransitGateways (List)
- ec2:DescribeVpcEndpointServiceConfigurations (List)
- ec2:DescribeVpcEndpoints (List)
- ec2:DescribeVpcPeeringConnections (List)
- ec2:DescribeVpcs (List)
- ec2:DescribeVpnConnections (List)
- ec2:DescribeVpnGateways (List)
- ec2:GetManagedPrefixListEntries (Read)
- ec2:GetSecurityGroupsForVpc (Read)
- ec2:GetTransitGatewayPolicyTableAssociations (List)
- ec2:GetTransitGatewayPolicyTableEntries (List)
- ec2:GetTransitGatewayRouteTablePropagations (List)
- ec2:SearchTransitGatewayRoutes (List)
Elastic Container Registry: 10 actions
- ecr:BatchGetImage (Read)
- ecr:BatchGetRepositoryScanningConfiguration (Read)
- ecr:DescribeImages (List)
- ecr:DescribeRegistry (Read)
- ecr:DescribeRepositories (Read)
- ecr:GetAuthorizationToken (Read)
- ecr:GetDownloadUrlForLayer (Read)
- ecr:GetRegistryScanningConfiguration (Read)
- ecr:ListImages (List)
- ecr:PutRegistryScanningConfiguration (Write)
Elastic Container Service: 3 actions
- ecs:DescribeTasks (Read)
- ecs:ListClusters (List)
- ecs:ListTasks (List)
EKS: 1 actions
- eks:ListClusters (List)
ELB: 8 actions
- elasticloadbalancing:DescribeListeners (Read)
- elasticloadbalancing:DescribeLoadBalancerAttributes (Read)
- elasticloadbalancing:DescribeLoadBalancers (List)
- elasticloadbalancing:DescribeRules (Read)
- elasticloadbalancing:DescribeTags (Read)
- elasticloadbalancing:DescribeTargetGroupAttributes (Read)
- elasticloadbalancing:DescribeTargetGroups (Read)
- elasticloadbalancing:DescribeTargetHealth (Read)
EventBridge: 6 actions
- events:DeleteRule (Write)
- events:DescribeRule (Read)
- events:ListTargetsByRule (List)
- events:PutRule (Write)
- events:PutTargets (Write)
- events:RemoveTargets (Write)
IAM: 8 actions
- iam:GetPolicy (Read)
- iam:GetPolicyVersion (Read)
- iam:GetRole (Read)
- iam:GetRolePolicy (Read)
- iam:ListAttachedRolePolicies (List)
- iam:ListPolicies (List)
- iam:ListPolicyVersions (List)
- iam:ListRolePolicies (List)
Inspector2: 4 actions
- inspector2:AssociateMember (Write)
- inspector2:Disable (Write)
- inspector2:Enable (Write)
- inspector2:EnableDelegatedAdminAccount (Write)
Lambda: 5 actions
- lambda:GetFunction (Read)
- lambda:GetLayerVersion (Read)
- lambda:ListFunctions (List)
- lambda:ListTags (Read)
- lambda:ListVersionsByFunction (List)
Network Firewall: 8 actions
- network-firewall:DescribeFirewall (Read)
- network-firewall:DescribeFirewallMetadata (Read)
- network-firewall:DescribeFirewallPolicy (Read)
- network-firewall:DescribeResourcePolicy (Read)
- network-firewall:DescribeRuleGroup (Read)
- network-firewall:ListFirewallPolicies (List)
- network-firewall:ListFirewalls (List)
- network-firewall:ListRuleGroups (List)
Organizations: 4 actions
- organizations:DescribeAccount (Read)
- organizations:DescribeOrganization (Read)
- organizations:ListAccounts (List)
- organizations:ListDelegatedAdministrators (List)
Systems Manager: 16 actions
- ssm:CreateAssociation (Write)
- ssm:CreateResourceDataSync (Write)
- ssm:DeleteAssociation (Write)
- ssm:DeleteParameter (Write)
- ssm:DeleteResourceDataSync (Write)
- ssm:DescribeAssociation (Read)
- ssm:DescribeAssociationExecutions (Read)
- ssm:DescribeInstanceInformation (Read)
- ssm:GetCommandInvocation (Read)
- ssm:GetParameters (Read)
- ssm:ListAssociations (List)
- ssm:ListResourceDataSync (List)
- ssm:PutParameter (Write)
- ssm:SendCommand (Write)
- ssm:StartAssociationsOnce (Write)
- ssm:UpdateAssociation (Write)
Tiros: 2 actions
- tiros:CreateQuery (Write)
- tiros:GetQueryAnswer (Read)
Data-plane actions (2)
By access level: 1 Read, 1 Write.
| Service | Granted | Access levels and limits | Granted by |
|---|---|---|---|
| CloudWatch | 2 of 5 | 1 Read, 1 Write; 1 restricted, 1 conditional | cloudwatch:GetMetricData, cloudwatch:PutMetricData |
CloudWatch: 2 actions
- cloudwatch:GetMetricData (Read)
- cloudwatch:PutMetricData (Write)
Excluded and conditional actions
No patterns are excluded by NotAction or Deny statements.
Resource scope and attachment
Resource scope across granted actions: mixed.
Can be attached: No (service-linked role policy).
Why this tier
- Grants 24 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
- AIDevOpsReleaseManagementVPCPolicy
- AIOpsOperatorAccess
- AmazonAppStreamServiceAccess
- AmazonBioDiscoveryServiceLinkedRolePolicy
- AmazonDataZoneEnvironmentRolePermissionsBoundary
- AmazonDataZoneProjectDeploymentPermissionsBoundary
- AmazonDataZoneProjectRolePermissionsBoundary
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": "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"
]
}
}
}
]
}
Version history
Current version v27, edited by AWS on 2026-06-16. 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.