aws iam list-attached-user-policies
Jump to navigation
Jump to search
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: