Reputation: 729
I have secret key and access key of one root account, can i find the username and password for the same
Upvotes: 0
Views: 75
Reputation: 64731
This is not possible:
You can retrieve the username for a regular IAM user based on its IAM user credentials by means of the AWS CLI's get-user command for example:
Retrieves information about the specified user, including the user's creation date, path, unique ID, and ARN.
If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID used to sign the request.
However, when used with root account credentials, it returns the AWS account id or alias, rather than the email address that comprises the root user name.
Furthermore, retrieving the password is not possible in the first place for both types of principals, as it should be with any kind of security sensitive service - it will only be shown once on creation for regular IAM users and resetting requires assistance by another account user with IAM privileges; resetting the root account password requires following the resp. password recovery process for the root account accordingly, i.e. interaction with the AWS account management backend/staff.
Upvotes: 1