user5047085
user5047085

Reputation:

How to get AWS email address for a user?

In these docs: https://docs.aws.amazon.com/cli/latest/reference/iam/get-user.html

we can get a user with:

aws iam get-user --user-name Bob

and the result is:

{
    "User": {
        "UserName": "Bob",
        "Path": "/",
        "CreateDate": "2012-09-21T23:03:13Z",
        "UserId": "AKIAIOSFODNN7EXAMPLE",
        "Arn": "arn:aws:iam::123456789012:user/Bob"
    }
}

but how do we get this user's email address?

Upvotes: 0

Views: 2376

Answers (1)

Chris McKinnel
Chris McKinnel

Reputation: 15102

IAM users do not have an email address property. Are you sure you're referring to IAM users?

The root user for your AWS account will have an email address associated with it, but there is only one of these users.

Also, if you have a Cognito user pool, these users can have an email address associated with them.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html

https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools.html

Upvotes: 1

Related Questions