How Network Access Analyzer works with IAM - Amazon Virtual Private Cloud

How Network Access Analyzer works with IAM

Before you use IAM to manage access to Network Access Analyzer, you should understand what IAM features are available to use with Network Access Analyzer. To get a high-level view of how Network Access Analyzer and other AWS services work with IAM, see AWS services that work with IAM in the IAM User Guide.

Network Access Analyzer identity-based policies

With IAM identity-based policies, you can specify allowed or denied actions and resources as well as the conditions under which actions are allowed or denied. Network Access Analyzer supports specific actions and resources. There are no Network Access Analyzer service-specific condition keys that can be used in the Condition element of policy statements. To learn about all of the elements that you use in a JSON policy, see IAM JSON policy elements reference in the IAM User Guide.


Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions.

The Action element of a JSON policy describes the actions that you can use to allow or deny access in a policy. Policy actions usually have the same name as the associated AWS API operation. There are some exceptions, such as permission-only actions that don't have a matching API operation. There are also some operations that require multiple actions in a policy. These additional actions are called dependent actions.

Include actions in a policy to grant permissions to perform the associated operation.

Network Access Analyzer shares its API namespace with Amazon EC2. Policy actions in Network Access Analyzer use the following prefix before the action: ec2:. For example, to grant someone permission to create a Network Access Scope with the CreateNetworkInsightsAccessScope API operation, you include the ec2:CreateNetworkInsightsAccessScope action in their policy. Policy statements must include either an Action or NotAction element.

To specify multiple actions in a single statement, separate them with commas as shown in the following example.

"Action": [ "ec2:action1", "ec2:action2" ]

You can specify multiple actions using wildcards (*). For example, to specify all actions that begin with the word Describe, include the following action.

"Action": "ec2:Describe*"

The following actions are supported by Network Access Analyzer:

  • CreateNetworkInsightsAccessScope

  • DeleteNetworkInsightsAccessScope

  • DeleteNetworkInsightsAccessScopeAnalysis

  • DescribeNetworkInsightsAccessScopeAnalyses

  • DescribeNetworkInsightsAccessScopes

  • GetNetworkInsightsAccessScopeAnalysisFindings

  • GetNetworkInsightsAccessScopeContent

  • StartNetworkInsightsAccessScopeAnalysis


Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions.

The Resource JSON policy element specifies the object or objects to which the action applies. Statements must include either a Resource or a NotResource element. As a best practice, specify a resource using its Amazon Resource Name (ARN). You can do this for actions that support a specific resource type, known as resource-level permissions.

For actions that don't support resource-level permissions, such as listing operations, use a wildcard (*) to indicate that the statement applies to all resources.

"Resource": "*"

The following Network Access Analyzer API actions do not support resource-level permissions:

  • DescribeNetworkInsightsAccessScopeAnalyses

  • DescribeNetworkInsightsAccessScopes

Condition keys

The Condition element (or Condition block) lets you specify conditions in which a statement is in effect. For example, you might want a policy to be applied only after a specific date. To express conditions, use predefined condition keys.

Network Access Analyzer does not provide any service-specific condition keys, but it does support using some global condition keys. To see all AWS global condition keys, see AWS global condition context keys in the IAM User Guide.

All Amazon EC2 actions support the aws:RequestedRegion and ec2:Region condition keys. For more information, see Example: Restricting Access to a Specific Region.

The Condition element is optional.

Authorization based on Network Access Analyzer tags

You can attach tags to Network Access Analyzer resources or pass tags in a request. To control access based on tags, you provide tag information in the condition element of a policy using the ec2:ResourceTag/key-name, aws:RequestTag/key-name, or aws:TagKeys condition keys. For more information, see Granting permission to tag resources during creation, Controlling access to specific tags, and Controlling access to EC2 resources using resource tags in the Amazon EC2 User Guide.

Network Access Analyzer IAM roles

An IAM role is an entity within your AWS account that has specific permissions.

Using temporary credentials with Network Access Analyzer

You can use temporary credentials to sign in with federation, to assume an IAM role, or to assume a cross-account role. You obtain temporary security credentials by calling AWS STS API operations such as AssumeRole or GetFederationToken.

Network Access Analyzer supports using temporary credentials.

Service-linked roles

Network Access Analyzer has no service-linked roles.

Service roles

Network Access Analyzer has no service roles.