Difference between revisions of "Aws iam list-attached-user-policies"
Jump to navigation
Jump to search
Line 32: | Line 32: | ||
* <code>[[AccessDeniedException]]</code> | * <code>[[AccessDeniedException]]</code> | ||
* <code>An error occurred ([[AccessDenied]]) when calling the [[ListAttachedUserPolicies]] operation:</code> | * <code>An error occurred ([[AccessDenied]]) when calling the [[ListAttachedUserPolicies]] operation:</code> | ||
+ | * [[AmazonECS_FullAccess]] | ||
== See also == | == See also == |
Latest revision as of 15:25, 21 November 2023
aws iam list-attached-user-policies --user-name YOUR_USERNAME
To obtain username:
aws sts get-caller-identity | grep user
Official AWS example output[edit]
{ "AttachedPolicies": [ { "PolicyName": "AdministratorAccess", "PolicyArn": "arn:aws:iam::aws:policy/AdministratorAccess" }, { "PolicyName": "SecurityAudit", "PolicyArn": "arn:aws:iam::aws:policy/SecurityAudit" } ], "IsTruncated": false }
Errors[edit]
An error occurred (AccessDenied) when calling the ListAttachedUserPolicies operation: User: arn:aws:sts::0987654321:assumed-role/YYYY/XXXXX is not authorized to perform: iam:ListAttachedUserPolicies on resource: user YOUR_USERNAME because no identity-based policy allows the iam:ListAttachedUserPolicies action
Related[edit]
aws iam list
aws sts get-caller-identity
aws iam list-attached-role-policies
- AWS Policy
AccessDeniedException
An error occurred (AccessDenied) when calling the ListAttachedUserPolicies operation:
- AmazonECS_FullAccess
See also[edit]
Advertising: