

# How AWS App Mesh works with IAM
<a name="security-iam"></a>

**Important**  
End of support notice: On September 30, 2026, AWS will discontinue support for AWS App Mesh. After September 30, 2026, you will no longer be able to access the AWS App Mesh console or AWS App Mesh resources. For more information, visit this blog post [Migrating from AWS App Mesh to Amazon ECS Service Connect](https://aws.amazon.com/blogs/containers/migrating-from-aws-app-mesh-to-amazon-ecs-service-connect). 

AWS Identity and Access Management (IAM) is an AWS service that helps an administrator securely control access to AWS resources. IAM administrators control who can be *authenticated* (signed in) and *authorized* (have permissions) to use App Mesh resources. IAM is an AWS service that you can use with no additional charge.

**Topics**
+ [Audience](#security_iam_audience)
+ [Authenticating with identities](#security_iam_authentication)
+ [Managing access using policies](#security_iam_access-manage)
+ [How AWS App Mesh works with IAM](security_iam_service-with-iam.md)
+ [AWS App Mesh identity-based policy examples](security_iam_id-based-policy-examples.md)
+ [AWS managed policies for App Mesh](security-iam-awsmanpol.md)
+ [Using service-linked roles for App Mesh](using-service-linked-roles.md)
+ [Envoy Proxy authorization](proxy-authorization.md)
+ [Troubleshooting AWS App Mesh identity and access](security_iam_troubleshoot.md)

## Audience
<a name="security_iam_audience"></a>

How you use AWS Identity and Access Management (IAM) differs based on your role:
+ **Service user** - request permissions from your administrator if you cannot access features (see [Troubleshooting AWS App Mesh identity and access](security_iam_troubleshoot.md))
+ **Service administrator** - determine user access and submit permission requests (see [How AWS App Mesh works with IAM](security_iam_service-with-iam.md))
+ **IAM administrator** - write policies to manage access (see [AWS App Mesh identity-based policy examples](security_iam_id-based-policy-examples.md))

## Authenticating with identities
<a name="security_iam_authentication"></a>

Authentication is how you sign in to AWS using your identity credentials. You must be authenticated as the AWS account root user, an IAM user, or by assuming an IAM role.

You can sign in as a federated identity using credentials from an identity source like AWS IAM Identity Center (IAM Identity Center), single sign-on authentication, or Google/Facebook credentials. For more information about signing in, see [How to sign in to your AWS account](https://docs.aws.amazon.com/signin/latest/userguide/how-to-sign-in.html) in the *AWS Sign-In User Guide*.

For programmatic access, AWS provides an SDK and CLI to cryptographically sign requests. For more information, see [AWS Signature Version 4 for API requests](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html) in the *IAM User Guide*.

### AWS account root user
<a name="security_iam_authentication-rootuser"></a>

 When you create an AWS account, you begin with one sign-in identity called the AWS account *root user* that has complete access to all AWS services and resources. We strongly recommend that you don't use the root user for everyday tasks. For tasks that require root user credentials, see [Tasks that require root user credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#root-user-tasks) in the *IAM User Guide*. 

### IAM users and groups
<a name="security_iam_authentication-iamuser"></a>

An *[IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html)* is an identity with specific permissions for a single person or application. We recommend using temporary credentials instead of IAM users with long-term credentials. For more information, see [Require human users to use federation with an identity provider to access AWS using temporary credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#bp-users-federation-idp) in the *IAM User Guide*.

An [https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html) specifies a collection of IAM users and makes permissions easier to manage for large sets of users. For more information, see [Use cases for IAM users](https://docs.aws.amazon.com/IAM/latest/UserGuide/gs-identities-iam-users.html) in the *IAM User Guide*.

### IAM roles
<a name="security_iam_authentication-iamrole"></a>

An *[IAM role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)* is an identity with specific permissions that provides temporary credentials. You can assume a role by [switching from a user to an IAM role (console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-console.html) or by calling an AWS CLI or AWS API operation. For more information, see [Methods to assume a role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage-assume.html) in the *IAM User Guide*.

IAM roles are useful for federated user access, temporary IAM user permissions, cross-account access, cross-service access, and applications running on Amazon EC2. For more information, see [Cross account resource access in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html) in the *IAM User Guide*.

## Managing access using policies
<a name="security_iam_access-manage"></a>

You control access in AWS by creating policies and attaching them to AWS identities or resources. A policy defines permissions when associated with an identity or resource. AWS evaluates these policies when a principal makes a request. Most policies are stored in AWS as JSON documents. For more information about JSON policy documents, see [Overview of JSON policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policies-json) in the *IAM User Guide*.

Using policies, administrators specify who has access to what by defining which **principal** can perform **actions** on what **resources**, and under what **conditions**.

By default, users and roles have no permissions. An IAM administrator creates IAM policies and adds them to roles, which users can then assume. IAM policies define permissions regardless of the method used to perform the operation.

### Identity-based policies
<a name="security_iam_access-manage-id-based-policies"></a>

Identity-based policies are JSON permissions policy documents that you attach to an identity (user, group, or role). These policies control what actions identities can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see [Define custom IAM permissions with customer managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html) in the *IAM User Guide*.

Identity-based policies can be *inline policies* (embedded directly into a single identity) or *managed policies* (standalone policies attached to multiple identities). To learn how to choose between managed and inline policies, see [Choose between managed policies and inline policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-choosing-managed-or-inline.html) in the *IAM User Guide*.

### Resource-based policies
<a name="security_iam_access-manage-resource-based-policies"></a>

Resource-based policies are JSON policy documents that you attach to a resource. Examples include IAM *role trust policies* and Amazon S3 *bucket policies*. In services that support resource-based policies, service administrators can use them to control access to a specific resource. You must [specify a principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html) in a resource-based policy.

Resource-based policies are inline policies that are located in that service. You can't use AWS managed policies from IAM in a resource-based policy.

### Access control lists (ACLs)
<a name="security_iam_access-manage-acl"></a>

Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format.

Amazon S3, AWS WAF, and Amazon VPC are examples of services that support ACLs. To learn more about ACLs, see [Access control list (ACL) overview](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html) in the *Amazon Simple Storage Service Developer Guide*.

### Other policy types
<a name="security_iam_access-manage-other-policies"></a>

AWS supports additional policy types that can set the maximum permissions granted by more common policy types:
+ **Permissions boundaries** – Set the maximum permissions that an identity-based policy can grant to an IAM entity. For more information, see [Permissions boundaries for IAM entities](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) in the *IAM User Guide*.
+ **Service control policies (SCPs)** – Specify the maximum permissions for an organization or organizational unit in AWS Organizations. For more information, see [Service control policies](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html) in the *AWS Organizations User Guide*.
+ **Resource control policies (RCPs)** – Set the maximum available permissions for resources in your accounts. For more information, see [Resource control policies (RCPs)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html) in the *AWS Organizations User Guide*.
+ **Session policies** – Advanced policies passed as a parameter when creating a temporary session for a role or federated user. For more information, see [Session policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) in the *IAM User Guide*.

### Multiple policy types
<a name="security_iam_access-manage-multiple-policies"></a>

When multiple types of policies apply to a request, the resulting permissions are more complicated to understand. To learn how AWS determines whether to allow a request when multiple policy types are involved, see [Policy evaluation logic](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) in the *IAM User Guide*.

# How AWS App Mesh works with IAM
<a name="security_iam_service-with-iam"></a>

**Important**  
End of support notice: On September 30, 2026, AWS will discontinue support for AWS App Mesh. After September 30, 2026, you will no longer be able to access the AWS App Mesh console or AWS App Mesh resources. For more information, visit this blog post [Migrating from AWS App Mesh to Amazon ECS Service Connect](https://aws.amazon.com/blogs/containers/migrating-from-aws-app-mesh-to-amazon-ecs-service-connect). 

Before you use IAM to manage access to App Mesh, you should understand what IAM features are available to use with App Mesh. To get a high-level view of how App Mesh and other AWS services work with IAM, see [AWS Services That Work with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) in the *IAM User Guide*.

**Topics**
+ [App Mesh identity-based policies](#security_iam_service-with-iam-id-based-policies)
+ [App Mesh resource-based policies](#security_iam_service-with-iam-resource-based-policies)
+ [Authorization based on App Mesh tags](#security_iam_service-with-iam-tags)
+ [App Mesh IAM roles](#security_iam_service-with-iam-roles)

## App Mesh identity-based policies
<a name="security_iam_service-with-iam-id-based-policies"></a>

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. App Mesh supports specific actions, resources, and condition keys. To learn about all of the elements that you use in a JSON policy, see [IAM JSON Policy Elements Reference](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html) in the *IAM User Guide*.

### Actions
<a name="security_iam_service-with-iam-id-based-policies-actions"></a>

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. Include actions in a policy to grant permissions to perform the associated operation.

Policy actions in App Mesh use the following prefix before the action: `appmesh:`. For example, to grant someone permission to list meshes in an account with the `appmesh:ListMeshes` API operation, you include the `appmesh:ListMeshes` 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 follows.

```
"Action": [
      "appmesh:ListMeshes",
      "appmesh:ListVirtualNodes"
]
```

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

```
"Action": "appmesh:Describe*"
```



To see a list of App Mesh actions, see [Actions Defined by AWS App Mesh](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awsappmesh.html#awsappmesh-actions-as-permissions) in the *IAM User Guide*.

### Resources
<a name="security_iam_service-with-iam-id-based-policies-resources"></a>

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. As a best practice, specify a resource using its [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html). For actions that don't support resource-level permissions, use a wildcard (\$1) to indicate that the statement applies to all resources.

```
"Resource": "*"
```



The App Mesh `mesh` resource has the following ARN.

```
arn:${Partition}:appmesh:${Region}:${Account}:mesh/${MeshName}
```

For more information about the format of ARNs, see [Amazon Resource Names (ARNs) and AWS Service Namespaces](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).

For example, to specify the mesh named *apps* in the *Region-code* Region in your statement, use the following ARN.

```
arn:aws:appmesh:Region-code:111122223333:mesh/apps
```

To specify all instances that belong to a specific account, use the wildcard (\$1).

```
"Resource": "arn:aws:appmesh:Region-code:111122223333:mesh/*"
```

Some App Mesh actions, such as those for creating resources, cannot be performed on a specific resource. In those cases, you must use the wildcard (\$1).

```
"Resource": "*"
```

Many App Mesh API actions involve multiple resources. For example, `CreateRoute` creates a route with a virtual node target, so an IAM user must have permissions to use the route and the virtual node. To specify multiple resources in a single statement, separate the ARNs with commas. 

```
"Resource": [
      "arn:aws:appmesh:Region-code:111122223333:mesh/apps/virtualRouter/serviceB/route/*",
      "arn:aws:appmesh:Region-code:111122223333:mesh/apps/virtualNode/serviceB"
]
```

To see a list of App Mesh resource types and their ARNs, see [Resources Defined by AWS App Mesh](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awsappmesh.html#awsappmesh-resources-for-iam-policies) in the *IAM User Guide*. To learn with which actions you can specify the ARN of each resource, see [Actions Defined by AWS App Mesh](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awsappmesh.html#awsappmesh-actions-as-permissions).

### Condition keys
<a name="security_iam_service-with-iam-id-based-policies-conditionkeys"></a>

App Mesh supports using some global condition keys. To see all AWS global condition keys, see [AWS Global Condition Context Keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html) in the *IAM User Guide*. To see a list of the global condition keys that App Mesh supports, see [Condition Keys for AWS App Mesh](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awsappmesh.html#awsappmesh-policy-keys) in the *IAM User Guide*. To learn with which actions and resources you can use with a condition key, see [Actions Defined by AWS App Mesh](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awsappmesh.html#awsappmesh-actions-as-permissions).

### Examples
<a name="security_iam_service-with-iam-id-based-policies-examples"></a>



To view examples of App Mesh identity-based policies, see [AWS App Mesh identity-based policy examples](security_iam_id-based-policy-examples.md).

## App Mesh resource-based policies
<a name="security_iam_service-with-iam-resource-based-policies"></a>

App Mesh doesn't support resource-based policies. However, if you use the AWS Resource Access Manager (AWS RAM) service to share a mesh across AWS services, a resource-based policy is applied to your mesh by the AWS RAM service. For more information, see [Granting permissions for a mesh](sharing.md#sharing-permissions-resource).

## Authorization based on App Mesh tags
<a name="security_iam_service-with-iam-tags"></a>

You can attach tags to App Mesh resources or pass tags in a request to App Mesh. To control access based on tags, you provide tag information in the [condition element](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html) of a policy using the `appmesh:ResourceTag/key-name`, `aws:RequestTag/key-name`, or `aws:TagKeys` condition keys. For more information about tagging App Mesh resources, see [Tagging AWS Resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html).

To view an example identity-based policy for limiting access to a resource based on the tags on that resource, see [Creating App Mesh meshes with restricted tags](security_iam_id-based-policy-examples.md#security_iam_id-based-policy-examples-view-widget-tags).

## App Mesh IAM roles
<a name="security_iam_service-with-iam-roles"></a>

An [IAM role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) is an entity within your AWS account that has specific permissions.

### Using temporary credentials with App Mesh
<a name="security_iam_service-with-iam-roles-tempcreds"></a>

You can use temporary credentials to sign in with federation, 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](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html) or [GetFederationToken](https://docs.aws.amazon.com/STS/latest/APIReference/API_GetFederationToken.html). 

App Mesh supports using temporary credentials. 

### Service-linked roles
<a name="security_iam_service-with-iam-roles-service-linked"></a>

[Service-linked roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role) allow AWS services to access resources in other services to complete an action on your behalf. Service-linked roles appear in your IAM account and are owned by the service. An IAM administrator can view but not edit the permissions for service-linked roles.

App Mesh supports service-linked roles. For details about creating or managing App Mesh service-linked roles, see [Using service-linked roles for App Mesh](using-service-linked-roles.md).

### Service roles
<a name="security_iam_service-with-iam-roles-service"></a>

This feature allows a service to assume a [service role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-role) on your behalf. This role allows the service to access resources in other services to complete an action on your behalf. Service roles appear in your IAM account and are owned by the account. This means that an IAM administrator can change the permissions for this role. However, doing so might break the functionality of the service.

App Mesh does not support service roles.

# AWS App Mesh identity-based policy examples
<a name="security_iam_id-based-policy-examples"></a>

**Important**  
End of support notice: On September 30, 2026, AWS will discontinue support for AWS App Mesh. After September 30, 2026, you will no longer be able to access the AWS App Mesh console or AWS App Mesh resources. For more information, visit this blog post [Migrating from AWS App Mesh to Amazon ECS Service Connect](https://aws.amazon.com/blogs/containers/migrating-from-aws-app-mesh-to-amazon-ecs-service-connect). 

By default, IAM users and roles don't have permission to create or modify App Mesh resources. They also can't perform tasks using the AWS Management Console, AWS CLI, or AWS API. An IAM administrator must create IAM policies that grant users and roles permission to perform specific API operations on the specified resources they need. The administrator must then attach those policies to the IAM users or groups that require those permissions.

To learn how to create an IAM identity-based policy using these example JSON policy documents, see [Creating Policies on the JSON Tab](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html#access_policies_create-json-editor) in the *IAM User Guide*.

**Topics**
+ [Policy best practices](#security_iam_service-with-iam-policy-best-practices)
+ [Using the App Mesh console](#security_iam_id-based-policy-examples-console)
+ [Allow users to view their own permissions](#security_iam_id-based-policy-examples-view-own-permissions)
+ [Create a mesh](#policy_example1)
+ [List and describe all meshes](#policy_example2)
+ [Creating App Mesh meshes with restricted tags](#security_iam_id-based-policy-examples-view-widget-tags)

## Policy best practices
<a name="security_iam_service-with-iam-policy-best-practices"></a>

Identity-based policies determine whether someone can create, access, or delete App Mesh resources in your account. These actions can incur costs for your AWS account. When you create or edit identity-based policies, follow these guidelines and recommendations:
+ **Get started with AWS managed policies and move toward least-privilege permissions** – To get started granting permissions to your users and workloads, use the *AWS managed policies* that grant permissions for many common use cases. They are available in your AWS account. We recommend that you reduce permissions further by defining AWS customer managed policies that are specific to your use cases. For more information, see [AWS managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies) or [AWS managed policies for job functions](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html) in the *IAM User Guide*.
+ **Apply least-privilege permissions** – When you set permissions with IAM policies, grant only the permissions required to perform a task. You do this by defining the actions that can be taken on specific resources under specific conditions, also known as *least-privilege permissions*. For more information about using IAM to apply permissions, see [ Policies and permissions in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) in the *IAM User Guide*.
+ **Use conditions in IAM policies to further restrict access** – You can add a condition to your policies to limit access to actions and resources. For example, you can write a policy condition to specify that all requests must be sent using SSL. You can also use conditions to grant access to service actions if they are used through a specific AWS service, such as CloudFormation. For more information, see [ IAM JSON policy elements: Condition](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html) in the *IAM User Guide*.
+ **Use IAM Access Analyzer to validate your IAM policies to ensure secure and functional permissions** – IAM Access Analyzer validates new and existing policies so that the policies adhere to the IAM policy language (JSON) and IAM best practices. IAM Access Analyzer provides more than 100 policy checks and actionable recommendations to help you author secure and functional policies. For more information, see [Validate policies with IAM Access Analyzer](https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-policy-validation.html) in the *IAM User Guide*.
+ **Require multi-factor authentication (MFA)** – If you have a scenario that requires IAM users or a root user in your AWS account, turn on MFA for additional security. To require MFA when API operations are called, add MFA conditions to your policies. For more information, see [ Secure API access with MFA](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_configure-api-require.html) in the *IAM User Guide*.

For more information about best practices in IAM, see [Security best practices in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) in the *IAM User Guide*.

## Using the App Mesh console
<a name="security_iam_id-based-policy-examples-console"></a>

To access the AWS App Mesh console, you must have a minimum set of permissions. These permissions must allow you to list and view details about the App Mesh resources in your AWS account. If you create an identity-based policy that is more restrictive than the minimum required permissions, the console won't function as intended for entities (IAM users or roles) with that policy. You can attach the `[AWSAppMeshReadOnly](https://console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/AWSAppMeshReadOnly%24jsonEditor)` managed policy to users. For more information, see [Adding Permissions to a User](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html#users_change_permissions-add-console) in the *IAM User Guide*.

You don't need to allow minimum console permissions for users that are making calls only to the AWS CLI or the AWS API. Instead, allow access to only the actions that match the API operation that you're trying to perform.

## Allow users to view their own permissions
<a name="security_iam_id-based-policy-examples-view-own-permissions"></a>

This example shows how you might create a policy that allows IAM users to view the inline and managed policies that are attached to their user identity. This policy includes permissions to complete this action on the console or programmatically using the AWS CLI or AWS API.

```
{
    "Version": "2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "ViewOwnUserInfo",
            "Effect": "Allow",
            "Action": [
                "iam:GetUserPolicy",
                "iam:ListGroupsForUser",
                "iam:ListAttachedUserPolicies",
                "iam:ListUserPolicies",
                "iam:GetUser"
            ],
            "Resource": ["arn:aws:iam::*:user/${aws:username}"]
        },
        {
            "Sid": "NavigateInConsole",
            "Effect": "Allow",
            "Action": [
                "iam:GetGroupPolicy",
                "iam:GetPolicyVersion",
                "iam:GetPolicy",
                "iam:ListAttachedGroupPolicies",
                "iam:ListGroupPolicies",
                "iam:ListPolicyVersions",
                "iam:ListPolicies",
                "iam:ListUsers"
            ],
            "Resource": "*"
        }
    ]
}
```

## Create a mesh
<a name="policy_example1"></a>

This example shows how you can create a policy that allows a user to create a mesh for an account, in any Region.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "appmesh:CreateMesh",
            "Resource": "arn:aws:appmesh:*:123456789012:CreateMesh"
        }
    ]
}
```

------

## List and describe all meshes
<a name="policy_example2"></a>

This example shows how you can create a policy that allows a user read-only access to list and describe all meshes.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "appmesh:DescribeMesh",
                "appmesh:ListMeshes"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## Creating App Mesh meshes with restricted tags
<a name="security_iam_id-based-policy-examples-view-widget-tags"></a>

You can use tags in your IAM policies to control what tags can be passed in the IAM request. You can specify which tag key-value pairs can be added, changed, or removed from an IAM user or role. This example shows how you might create a policy that allows creating a mesh, but only if the mesh is created with a tag named *teamName* and a value of *booksTeam*.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "appmesh:CreateMesh",
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "aws:RequestTag/teamName": "booksTeam"
                }
            }
        }
    ]
}
```

------

You can attach this policy to the IAM users in your account. If a user attempts to create a mesh, the mesh must include a tag named `teamName` and a value of `booksTeam`. If the mesh does not include this tag and value, the attempt to create the mesh fails. For more information, see [IAM JSON Policy Elements: Condition](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html) in the *IAM User Guide*.

# AWS managed policies for App Mesh
<a name="security-iam-awsmanpol"></a>

**Important**  
End of support notice: On September 30, 2026, AWS will discontinue support for AWS App Mesh. After September 30, 2026, you will no longer be able to access the AWS App Mesh console or AWS App Mesh resources. For more information, visit this blog post [Migrating from AWS App Mesh to Amazon ECS Service Connect](https://aws.amazon.com/blogs/containers/migrating-from-aws-app-mesh-to-amazon-ecs-service-connect). 

An AWS managed policy is a standalone policy that is created and administered by AWS. AWS managed policies are designed to provide permissions for many common use cases so that you can start assigning permissions to users, groups, and roles.

Keep in mind that AWS managed policies might not grant least-privilege permissions for your specific use cases because they're available for all AWS customers to use. We recommend that you reduce permissions further by defining [ customer managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#customer-managed-policies) that are specific to your use cases.

You cannot change the permissions defined in AWS managed policies. If AWS updates the permissions defined in an AWS managed policy, the update affects all principal identities (users, groups, and roles) that the policy is attached to. AWS is most likely to update an AWS managed policy when a new AWS service is launched or new API operations become available for existing services.

For more information, see [AWS managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies) in the *IAM User Guide*.

## AWS managed policy: AWSAppMeshServiceRolePolicy
<a name="security-iam-awsmanpol-AWSAppMeshServiceRolePolicy"></a>

You can attach `AWSAppMeshServiceRolePolicy` to your IAM entities. Enables access to AWS Services and resources used or managed by AWS App Mesh.

To view the permissions for this policy, see [AWSAppMeshServiceRolePolicy](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSAppMeshServiceRolePolicy.html) in the *AWS Managed Policy Reference*.

For information on the permission details for the `AWSAppMeshServiceRolePolicy`, see see [Service-Linked Role Permissions for App Mesh](https://docs.aws.amazon.com/app-mesh/latest/userguide/using-service-linked-roles.html#slr-permissions).

## AWS managed policy: AWSAppMeshEnvoyAccess
<a name="security-iam-awsmanpol-AWSAppMeshEnvoyAccess"></a>

You can attach `AWSAppMeshEnvoyAccess` to your IAM entities. App Mesh Envoy policy for accessing virtual node configuration.

To view the permissions for this policy, see [AWSAppMeshEnvoyAccess](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSAppMeshEnvoyAccess.html) in the *AWS Managed Policy Reference*.

## AWS managed policy: AWSAppMeshFullAccess
<a name="security-iam-awsmanpol-AWSAppMeshFullAccess"></a>

You can attach `AWSAppMeshFullAccess` to your IAM entities. Provides full access to the AWS App Mesh APIs and AWS Management Console.

To view the permissions for this policy, see [AWSAppMeshFullAccess](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSAppMeshFullAccess.html) in the *AWS Managed Policy Reference*.

## AWS managed policy: AWSAppMeshPreviewEnvoyAccess
<a name="security-iam-awsmanpol-AWSAppMeshPreviewEnvoyAccess"></a>

You can attach `AWSAppMeshPreviewEnvoyAccess` to your IAM entities. App Mesh Preview Envoy policy for accessing virtual node configuration.

To view the permissions for this policy, see [AWSAppMeshPreviewEnvoyAccess](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSAppMeshPreviewEnvoyAccess.html) in the *AWS Managed Policy Reference*.

## AWS managed policy: AWSAppMeshPreviewServiceRolePolicy
<a name="security-iam-awsmanpol-AWSAppMeshPreviewServiceRolePolicy"></a>

You can attach `AWSAppMeshPreviewServiceRolePolicy` to your IAM entities. Enables access to AWS Services and resources used or managed by AWS App Mesh.

To view the permissions for this policy, see [AWSAppMeshPreviewServiceRolePolicy](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSAppMeshPreviewServiceRolePolicy.html) in the *AWS Managed Policy Reference*.

## AWS managed policy: AWSAppMeshReadOnly
<a name="security-iam-awsmanpol-AWSAppMeshReadOnly"></a>

You can attach `AWSAppMeshReadOnly` to your IAM entities. Provides read-only access to the AWS App Mesh APIs and AWS Management Console.

To view the permissions for this policy, see [AWSAppMeshReadOnly](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSAppMeshReadOnly.html) in the *AWS Managed Policy Reference*.

## AWS App Mesh updates to AWS managed policies
<a name="security-iam-awsmanpol-updates"></a>

View details about updates to AWS managed policies for AWS App Mesh since this service began tracking these changes. For automatic alerts about changes to this page, subscribe to the RSS feed on the AWS App Mesh Document history page.


| Change | Description | Date | 
| --- | --- | --- | 
|  [AWSAppMeshFullAccess](#security-iam-awsmanpol-AWSAppMeshFullAccess) – Updated policy.  |  Updated `AWSAppMeshFullAccess` to allow for access to the `TagResource` and `UntagResource`APIs.  | April  24, 2024 | 
|  [AWSAppMeshServiceRolePolicy](#security-iam-awsmanpol-AWSAppMeshServiceRolePolicy), [AWSServiceRoleForAppMesh](https://docs.aws.amazon.com/app-mesh/latest/userguide/using-service-linked-roles.html#slr-permissions) – Updated policy.  |  Updated `AWSServiceRoleForAppMesh` and `AWSAppMeshServiceRolePolicy` to allow for access to the AWS Cloud Map `DiscoverInstancesRevision` API.  | October 12, 2023 | 

To provide access, add permissions to your users, groups, or roles:
+ Users and groups in AWS IAM Identity Center:

  Create a permission set. Follow the instructions in [Create a permission set](https://docs.aws.amazon.com//singlesignon/latest/userguide/howtocreatepermissionset.html) in the *AWS IAM Identity Center User Guide*.
+ Users managed in IAM through an identity provider:

  Create a role for identity federation. Follow the instructions in [Create a role for a third-party identity provider (federation)](https://docs.aws.amazon.com//IAM/latest/UserGuide/id_roles_create_for-idp.html) in the *IAM User Guide*.
+ IAM users:
  + Create a role that your user can assume. Follow the instructions in [Create a role for an IAM user](https://docs.aws.amazon.com//IAM/latest/UserGuide/id_roles_create_for-user.html) in the *IAM User Guide*.
  + (Not recommended) Attach a policy directly to a user or add a user to a user group. Follow the instructions in [Adding permissions to a user (console)](https://docs.aws.amazon.com//IAM/latest/UserGuide/id_users_change-permissions.html#users_change_permissions-add-console) in the *IAM User Guide*.

# Using service-linked roles for App Mesh
<a name="using-service-linked-roles"></a>

**Important**  
End of support notice: On September 30, 2026, AWS will discontinue support for AWS App Mesh. After September 30, 2026, you will no longer be able to access the AWS App Mesh console or AWS App Mesh resources. For more information, visit this blog post [Migrating from AWS App Mesh to Amazon ECS Service Connect](https://aws.amazon.com/blogs/containers/migrating-from-aws-app-mesh-to-amazon-ecs-service-connect). 

AWS App Mesh uses AWS Identity and Access Management (IAM)[ service-linked roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role). A service-linked role is a unique type of IAM role that is linked directly to App Mesh. Service-linked roles are predefined by App Mesh and include all the permissions that the service requires to call other AWS services on your behalf. 

A service-linked role makes setting up App Mesh easier because you don’t have to manually add the necessary permissions. App Mesh defines the permissions of its service-linked roles, and unless defined otherwise, only App Mesh can assume its roles. The defined permissions include the trust policy and the permissions policy, and that permissions policy cannot be attached to any other IAM entity.

You can delete a service-linked role only after first deleting its related resources. This protects your App Mesh resources because you can't inadvertently remove permission to access the resources.

For information about other services that support service-linked roles, see [AWS Services That Work with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) and look for the services that have **Yes **in the **Service-Linked Role** column. Choose a **Yes** with a link to view the service-linked role documentation for that service.

## Service-linked role permissions for App Mesh
<a name="slr-permissions"></a>

App Mesh uses the service-linked role named **AWSServiceRoleForAppMesh** – The role allows App Mesh to call AWS services on your behalf.

The AWSServiceRoleForAppMesh service-linked role trusts the `appmesh.amazonaws.com` service to assume the role.

**Permission details**
+ `servicediscovery:DiscoverInstances` ‐ Allows App Mesh to complete actions on all AWS resources.
+ `servicediscovery:DiscoverInstancesRevision` ‐ Allows App Mesh to complete actions on all AWS resources.

### AWSServiceRoleForAppMesh
<a name="service-linked-role-permissions-AWSServiceRoleForAppMesh.details"></a>

This policy includes the following permissions:

------
#### [ JSON ]

****  

```
{
	"Version":"2012-10-17",		 	 	 
	"Statement": [
		{
			"Sid": "CloudMapServiceDiscovery",
			"Effect": "Allow",
			"Action": [
				"servicediscovery:DiscoverInstances",
				"servicediscovery:DiscoverInstancesRevision"
			],
			"Resource": "*"
		},
		{
			"Sid": "ACMCertificateVerification",
			"Effect": "Allow",
			"Action": [
				"acm:DescribeCertificate"
			],
			"Resource": "*"
		}
	]
}
```

------

You must configure permissions to allow an IAM entity (such as a user, group, or role) to create, edit, or delete a service-linked role. For more information, see [Service-Linked Role Permissions](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#service-linked-role-permissions) in the *IAM User Guide*.

## Creating a service-linked role for App Mesh
<a name="create-slr"></a>

If you created a mesh after June 5, 2019 in the AWS Management Console, the AWS CLI, or the AWS API, App Mesh created the service-linked role for you. For the service-linked role to have been created for you, the IAM account that you used to create the mesh must have had the [https://console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/AWSAppMeshFullAccess%24jsonEditor](https://console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/AWSAppMeshFullAccess%24jsonEditor) IAM policy attached to it, or a policy attached to it that contained the `iam:CreateServiceLinkedRole` permission. If you delete this service-linked role, and then need to create it again, you can use the same process to recreate the role in your account. When you create a mesh, App Mesh creates the service-linked role for you again. If your account only contains meshes created before June 5, 2019 and you want to use the service-linked role with those meshes, then you can create the role using the IAM console.

You can use the IAM console to create a service-linked role with the **App Mesh** use case. In the AWS CLI or the AWS API, create a service-linked role with the `appmesh.amazonaws.com` service name. For more information, see [Creating a Service-Linked Role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#create-service-linked-role) in the *IAM User Guide*. If you delete this service-linked role, you can use this same process to create the role again.

## Editing a service-linked role for App Mesh
<a name="edit-slr"></a>

App Mesh does not allow you to edit the AWSServiceRoleForAppMesh service-linked role. After you create a service-linked role, you cannot change the name of the role because various entities might reference the role. However, you can edit the description of the role using IAM. For more information, see [Editing a Service-Linked Role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#edit-service-linked-role) in the *IAM User Guide*.

## Deleting a service-linked role for App Mesh
<a name="delete-slr"></a>

If you no longer need to use a feature or service that requires a service-linked role, we recommend that you delete that role. That way you don’t have an unused entity that is not actively monitored or maintained. However, you must clean up the resources for your service-linked role before you can manually delete it.

**Note**  
If the App Mesh service is using the role when you try to delete the resources, then the deletion might fail. If that happens, wait for a few minutes and try the operation again.

**To delete App Mesh resources used by the AWSServiceRoleForAppMesh**

1. Delete all [routes](routes.md) defined for all routers in the mesh.

1. Delete all [virtual routers](virtual_routers.md) in the mesh.

1. Delete all [virtual services](virtual_services.md) in the mesh.

1. Delete all [virtual nodes](virtual_nodes.md) in the mesh.

1. Delete the [mesh](meshes.md).

Complete the previous steps for all meshes in your account.

**To manually delete the service-linked role using IAM**

Use the IAM console, the AWS CLI, or the AWS API to delete the AWSServiceRoleForAppMesh service-linked role. For more information, see [Deleting a Service-Linked Role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#delete-service-linked-role) in the *IAM User Guide*.

## Supported Regions for App Mesh service-linked roles
<a name="slr-regions"></a>

App Mesh supports using service-linked roles in all of the Regions where the service is available. For more information, see [App Mesh Endpoints and Quotas](https://docs.aws.amazon.com/general/latest/gr/appmesh.html).

# Envoy Proxy authorization
<a name="proxy-authorization"></a>

**Important**  
End of support notice: On September 30, 2026, AWS will discontinue support for AWS App Mesh. After September 30, 2026, you will no longer be able to access the AWS App Mesh console or AWS App Mesh resources. For more information, visit this blog post [Migrating from AWS App Mesh to Amazon ECS Service Connect](https://aws.amazon.com/blogs/containers/migrating-from-aws-app-mesh-to-amazon-ecs-service-connect). 

Proxy authorization authorizes the [Envoy](envoy.md) proxy running within an Amazon ECS task, in a Kubernetes pod running on Amazon EKS, or running on an Amazon EC2 instance to read the configuration of one or more mesh endpoints from the App Mesh Envoy Management Service. For customer accounts who already have Envoys connected to their App Mesh endpoint before 04/26/2021, proxy authorization is required for virtual nodes that use [Transport Layer Security (TLS)](https://docs.aws.amazon.com/app-mesh/latest/userguide/tls.html) and for virtual gateways (with or without TLS). For customer accounts who want to connect Envoys to their App Mesh endpoint after 04/26/2021, proxy authorization is required for all App Mesh capabilities. It is recommended for all customer accounts to enable proxy authorization for all virtual nodes, even if they don't use TLS, to have a secure and consistent experience using IAM for authorization to specific resources. Proxy authorization requires that the `appmesh:StreamAggregatedResources` permission is specified in an IAM policy. The policy must be attached to an IAM role, and that IAM role must be attached to the compute resource on which you host the proxy.

## Create IAM policy
<a name="create-iam-policy"></a>

If you want all mesh endpoints in a service mesh to be able to read the configuration for all mesh endpoints, then skip to [Create IAM role](#create-iam-role). If you want to limit the mesh endpoints that configuration can be read from by individual mesh endpoints, then you need to create one or more IAM policies. Limiting the mesh endpoints that configuration can be read from to only the Envoy proxy running on specific compute resources is recommended. Create an IAM policy and add the `appmesh:StreamAggregatedResources` permission to the policy. The following example policy allows the configuration of the virtual nodes named `serviceBv1` and `serviceBv2` to be read in a service mesh. Configuration can't be read for any other virtual nodes defined in the service mesh. For more information about creating or editing an IAM policy, see [Creating IAM Policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html) and [Edit IAM Policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage-edit.html).

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "appmesh:StreamAggregatedResources",
            "Resource": [
                "arn:aws:appmesh:us-east-1:123456789012:mesh/app1/virtualNode/serviceBv1",
                "arn:aws:appmesh:us-east-1:123456789012:mesh/app1/virtualNode/serviceBv2"
            ]
        }
    ]
}
```

------

You can create multiple policies, with each policy restricting access to different mesh endpoints. 

## Create IAM role
<a name="create-iam-role"></a>

If you want all mesh endpoints in a service mesh to be able to read the configuration for all mesh endpoints, then you only need to create one IAM role. If you want to limit the mesh endpoints that configuration can be read from by individual mesh endpoints, then you need to create a role for each policy that you created in the previous step. Complete the instructions for the compute resource that the proxy runs on.
+ **Amazon EKS** – If you want to use a singe role, then you can use the existing role that was created and assigned to the worker nodes when you created your cluster. To use multiple roles, your cluster must meet the requirements defined in [Enabling IAM Roles for Service Accounts on your Cluster](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html). Create the IAM roles and associate the roles with Kubernetes service accounts. For more information, see [Creating an IAM Role and Policy for your Service Account](https://docs.aws.amazon.com/eks/latest/userguide/create-service-account-iam-policy-and-role.html) and [Specifying an IAM Role for your Service Account](https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.html).
+ **Amazon ECS** – Select **AWS service,** select **Elastic Container Service**, and then select the **Elastic Container Service Task** use case when creating your IAM role.
+ **Amazon EC2** – Select **AWS service,** select **EC2**, and then select the **EC2** use case when creating your IAM role. This applies whether you host the proxy directly on an Amazon EC2 instance or on Kubernetes running on an instance.

For more information about how to create an IAM role, see [Creating a Role for an AWS Service](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html#roles-creatingrole-service-console).

## Attach IAM policy
<a name="attach-iam-policy"></a>

If you want all mesh endpoints in a service mesh to be able to read the configuration for all mesh endpoints, then attach the `[AWSAppMeshEnvoyAccess](https://console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/AWSAppMeshEnvoyAccess%24jsonEditor)` managed IAM policy to the IAM role that you created in a previous step. If you want to limit the mesh endpoints that configuration can be read from by individual mesh endpoints, then attach each policy that you created to each role that you created. For more information about attaching a custom or managed IAM policy to an IAM role, see [Adding IAM Identity Permissions](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage-attach-detach.html#add-policies-console). 

## Attach IAM role
<a name="attach-role"></a>

Attach each IAM role to the appropriate compute resource:
+ **Amazon EKS** – If you attached the policy to the role attached to your worker nodes, you can skip this step. If you created separate roles, then assign each role to a separate Kubernetes service account, and assign each service account to an individual Kubernetes pod deployment spec that includes the Envoy proxy. For more information, see [Specifying an IAM Role for your Service Account](https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.html) in the *Amazon EKS User Guide* and [Configure Service Accounts for Pods](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) in the Kubernetes documentation.
+ **Amazon ECS** – Attach an Amazon ECS Task Role to the task definition that includes the Envoy proxy. The task can be deployed with the EC2 or Fargate launch type. For more information about how to create an Amazon ECS Task Role and attach it to a task, see [Specifying an IAM Role for your Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html#create_task_iam_policy_and_role).
+ **Amazon EC2** – The IAM role must be attached to the Amazon EC2 instance that hosts the Envoy proxy. For more information about how to attach a role to an Amazon EC2 instance, see [I’ve created an IAM role, and now I want to assign it to an EC2 instance](https://aws.amazon.com/premiumsupport/knowledge-center/assign-iam-role-ec2-instance).

## Confirm permission
<a name="confirm-permission"></a>

Confirm that the `appmesh:StreamAggregatedResources` permission is assigned to the compute resource that you host the proxy on by selecting one of the compute service names.

------
#### [ Amazon EKS ]

A custom policy may be assigned to the role assigned to the worker nodes, to individual pods, or both. It's recommended however, that you assign the policy only at individual pods, so that you can restrict access of individual pods to individual mesh endpoints. If the policy is attached to the role assigned to the worker nodes, select the **Amazon EC2** tab, and complete the steps found there for your worker node instances. To determine which IAM role is assigned to a Kubernetes pod, complete the following steps.

1. View the details of a Kubernetes deployment that includes the pod that you want to confirm that a Kubernetes service account is assigned to. The following command views the details for a deployment named *my-deployment*.

   ```
   kubectl describe deployment my-deployment
   ```

   In the returned output note the value to the right of `Service Account:`. If a line that starts with `Service Account:` doesn't exist, then a custom Kubernetes service account isn't currently assigned to the deployment. You'll need to assign one. For more information, see [Configure Service Accounts for Pods](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) in the Kubernetes documentation.

1. View the details of the service account returned in the previous step. The following command views the details of a service account named *my-service-account*.

   ```
   kubectl describe serviceaccount my-service-account
   ```

   Provided the Kubernetes service account is associated to an AWS Identity and Access Management role, one of the lines returned will look similar to the following example.

   ```
   Annotations:         eks.amazonaws.com/role-arn=arn:aws:iam::123456789012:role/my-deployment
   ```

   In the previous example `my-deployment` is the name of the IAM role that the service account is associated with. If the service account output doesn't contain a line similar to the example above, then the Kubernetes service account isn't associated to an AWS Identity and Access Management account and you need to associate it to one. For more information, see [Specifying an IAM Role for your Service Account](https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.html). 

1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/).

1. In the left navigation, select **Roles**. Select the name of the IAM role that you noted in a previous step.

1. Confirm that either the custom policy you created previously, or the `[AWSAppMeshEnvoyAccess](https://console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/AWSAppMeshEnvoyAccess%24jsonEditor)` managed policy is listed. If neither policy is attached, [attach an IAM policy](#attach-iam-policy) to the IAM role. If you want to attach a custom IAM policy but don't have one, then you need to [create a custom IAM policy](#create-iam-policy) with the required permissions. If a custom IAM policy is attached, select the policy and confirm that it contains `"Action": "appmesh:StreamAggregatedResources"`. If it does not, then you need to add that permission to your custom IAM policy. You can also confirm that the appropriate Amazon Resource Name (ARN) for a specific mesh endpoint is listed. If no ARNs are listed, then you can edit the policy to add, remove, or change the listed ARNs. For more information, see [Edit IAM Policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage-edit.html) and [Create IAM policy](#create-iam-policy).

1. Repeat the previous steps for each Kubernetes pod that contains the Envoy proxy.

------
#### [ Amazon ECS ]

1. From the Amazon ECS console, choose **Task Definitions**.

1. Select your Amazon ECS task.

1. On the **Task Definition Name** page, select your task definition.

1. On the **Task Definition** page, select the link of the IAM role name that is to the right of **Task Role**. If an IAM role isn't listed, then you need to [create an IAM role](#create-iam-role) and attach it to your task by [updating your task definition.](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/update-task-definition.html)

1. In the **Summary** page, on the **Permissions** tab, confirm that either the custom policy you created previously, or the `[AWSAppMeshEnvoyAccess](https://console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/AWSAppMeshEnvoyAccess%24jsonEditor)` managed policy is listed. If neither policy is attached, [attach an IAM policy](#attach-iam-policy) to the IAM role. If you want to attach a custom IAM policy but don't have one, then you need to [create the custom IAM policy](#create-iam-policy). If a custom IAM policy is attached, select the policy and confirm that it contains `"Action": "appmesh:StreamAggregatedResources"`. If it does not, then you need to add that permission to your custom IAM policy. You can also confirm that the appropriate Amazon Resource Name (ARN) for a specific mesh endpoints is listed. If no ARNs are listed, then you can edit the policy to add, remove, or change the listed ARNs. For more information, see [Edit IAM Policies](https://docs.aws.amazon.com//IAM/latest/UserGuide/access_policies_manage-edit.html) and [Create IAM policy](#create-iam-policy).

1. Repeat the previous steps for each task definition that contains the Envoy proxy.

------
#### [ Amazon EC2 ]

1. From the Amazon EC2 console, select **Instances** in the left navigation.

1. Select one of your instances that hosts the Envoy proxy.

1. In the **Description** tab, select the link of the IAM role name that is to the right of **IAM role**. If an IAM role isn't listed, then you need to [create an IAM role](#create-iam-role).

1. In the **Summary** page, on the **Permissions** tab, confirm that either the custom policy you created previously, or the `[AWSAppMeshEnvoyAccess](https://console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/AWSAppMeshEnvoyAccess%24jsonEditor)` managed policy is listed. If neither policy is attached, [attach the IAM policy](#attach-iam-policy) to the IAM role. If you want to attach a custom IAM policy but don't have one, then you need to [create the custom IAM policy](#create-iam-policy). If a custom IAM policy is attached, select the policy and confirm that it contains `"Action": "appmesh:StreamAggregatedResources"`. If it does not, then you need to add that permission to your custom IAM policy. You can also confirm that the appropriate Amazon Resource Name (ARN) for a specific mesh endpoints is listed. If no ARNs are listed, then you can edit the policy to add, remove, or change the listed ARNs. For more information, see [Edit IAM Policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage-edit.html) and [Create IAM policy](#create-iam-policy).

1. Repeat the previous steps for each instance that you host the Envoy proxy on.

------

# Troubleshooting AWS App Mesh identity and access
<a name="security_iam_troubleshoot"></a>

**Important**  
End of support notice: On September 30, 2026, AWS will discontinue support for AWS App Mesh. After September 30, 2026, you will no longer be able to access the AWS App Mesh console or AWS App Mesh resources. For more information, visit this blog post [Migrating from AWS App Mesh to Amazon ECS Service Connect](https://aws.amazon.com/blogs/containers/migrating-from-aws-app-mesh-to-amazon-ecs-service-connect). 

Use the following information to help you diagnose and fix common issues that you might encounter when working with App Mesh and IAM.

**Topics**
+ [I am not authorized to perform an action in App Mesh](#security_iam_troubleshoot-no-permissions)
+ [I want to allow people outside of my AWS account to access my App Mesh resources](#security_iam_troubleshoot-cross-account-access)

## I am not authorized to perform an action in App Mesh
<a name="security_iam_troubleshoot-no-permissions"></a>

If the AWS Management Console tells you that you're not authorized to perform an action, then you must contact your administrator for assistance. Your administrator is the person that provided you with your sign-in credentials.

The following error occurs when the `mateojackson` IAM user tries to use the console to create a virtual node named *my-virtual-node* in the mesh named *my-mesh* but does not have the `appmesh:CreateVirtualNode` permission.

```
User: arn:aws:iam::123456789012:user/mateojackson is not authorized to perform: appmesh:CreateVirtualNode on resource: arn:aws:appmesh:us-east-1:123456789012:mesh/my-mesh/virtualNode/my-virtual-node
```

In this case, Mateo asks his administrator to update his policies to allow him to create a virtual node using the `appmesh:CreateVirtualNode` action.

**Note**  
Since a virtual node is created within a mesh, Mateo's account also requires the `appmesh:DescribeMesh` and `appmesh:ListMeshes` actions to create the virtual node in the console.

## I want to allow people outside of my AWS account to access my App Mesh resources
<a name="security_iam_troubleshoot-cross-account-access"></a>

You can create a role that users in other accounts or people outside of your organization can use to access your resources. You can specify who is trusted to assume the role. For services that support resource-based policies or access control lists (ACLs), you can use those policies to grant people access to your resources.

To learn more, consult the following:
+ To learn whether App Mesh supports these features, see [How AWS App Mesh works with IAM](security_iam_service-with-iam.md).
+ To learn how to provide access to your resources across AWS accounts that you own, see [Providing access to an IAM user in another AWS account that you own](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_aws-accounts.html) in the *IAM User Guide*.
+ To learn how to provide access to your resources to third-party AWS accounts, see [Providing access to AWS accounts owned by third parties](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_third-party.html) in the *IAM User Guide*.
+ To learn how to provide access through identity federation, see [Providing access to externally authenticated users (identity federation)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_federated-users.html) in the *IAM User Guide*.
+ To learn the difference between using roles and resource-based policies for cross-account access, see [Cross account resource access in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html) in the *IAM User Guide*.