Difference between revisions of "Whoamiaws"

From wikieduonline
Jump to navigation Jump to search
 
(23 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
  
<code>alias whoiamaws="[[aws iam get-user]]"</code>
+
<code>[[alias]] whoiamaws="[[aws iam get-user]]"</code>
 +
 
 +
 
 +
aws iam get-user
 +
{
 +
    "User": {
 +
        "Path": "/",
 +
        "UserName": "your-username",
 +
        "UserId": "AIAFETEGKLLQNAFAG",
 +
        "Arn": "[[arn:aws:iam]]::1234567890:user/your-username",
 +
        "CreateDate": "2022-03-28T15:22:33+00:00"
 +
    }
 +
}
 +
 
 +
== Errors ==
 +
aws iam get-user
 +
An error occurred ([[AccessDenied]]) when calling the GetUser operation: User: [[arn:aws:sts]]::0123456789:assumed- role/ROLE_NAME/YOURusername is not authorized to perform: [[iam:GetUser]] on resource:  user YOURusername
 +
 
 +
aws iam get-user
 +
An error occurred ([[ValidationError]]) when calling the [[GetUser]] operation: Must specify [[userName]] when calling with [[non-User credentials]]
 +
 
 +
aws iam get-user --user-name your-non-existant-user
 +
An error occurred ([[NoSuchEntity]]) when calling the [[GetUser]] operation: The user with name your-non-existant-user cannot be found.
  
 
== Related terms ==
 
== Related terms ==
* [[whoami]]
+
* <code>[[whoami]]</code>
* [[suaws]]
+
* <code>[[suaws]]</code>
 +
* <code>[[awswhoami]]: [[aws iam get-user]]</code>
 +
* [[Bash: alias]], [[.zprofile]]
 
* <code>[[aws iam list-account-aliases]]</code>
 
* <code>[[aws iam list-account-aliases]]</code>
 +
* <code>[[aws iam list-attached-user-policies --user-name]]</code>
 +
* <code>[[AWS_REGION]]</code>
 +
* <code>[[aws configure get region]]</code>
 +
* [[fish]]
  
 
== See also ==
 
== See also ==
*{{aws cli}}
+
* {{aws iam}}
*{{Bash}}
+
* {{Bash}}
  
 
[[Category:Bash]]
 
[[Category:Bash]]
 
[[Category:AWS]]
 
[[Category:AWS]]

Latest revision as of 10:28, 10 October 2024

alias whoiamaws="aws iam get-user"


aws iam get-user
{
   "User": {
       "Path": "/",
       "UserName": "your-username",
       "UserId": "AIAFETEGKLLQNAFAG",
       "Arn": "arn:aws:iam::1234567890:user/your-username",
       "CreateDate": "2022-03-28T15:22:33+00:00"
   }
}

Errors[edit]

aws iam get-user
An error occurred (AccessDenied) when calling the GetUser operation: User: arn:aws:sts::0123456789:assumed- role/ROLE_NAME/YOURusername is not authorized to perform: iam:GetUser on resource:  user YOURusername
aws iam get-user
An error occurred (ValidationError) when calling the GetUser operation: Must specify userName when calling with non-User credentials
aws iam get-user --user-name your-non-existant-user
An error occurred (NoSuchEntity) when calling the GetUser operation: The user with name your-non-existant-user cannot be found. 

Related terms[edit]

See also[edit]

Advertising: