DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป is a community of 970,177 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
@kon_yu
@kon_yu

Posted on

Checking the user information that is being accessed by AWS-CLI

Checking user information that is being accessed by AWS-CLI

Check which account you're logged in with the command

As you can see below, the credential file shows the access key and the secret key, but it's hard to know what they are.

~/.aws/credentials

[default]
aws_access_key_id=XXXXXXXXXXXXXXXXXX
aws_secret_access_key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

If you run aws sts get-caller-identity, you can determine the identity from the information such as arn.

> aws sts get-caller-identity
{
    "UserId": "XXXXXXXXXXXXX",
    "Account": "1234567890",
    "Arn": "arn:aws:iam::1234567890:user/user-name-1"
}

Top comments (0)

Take a look at this:

Settings

Go to your customization settings to nudge your home feed to show content more relevant to your developer experience level. ๐Ÿ›