DEV Community

kawasaki031677
kawasaki031677

Posted on Edited on

Quick Tip - How to Check AWS CLI Authentication Credentials

Introduction

When you want to verify which IAM user, IAM role, or AWS account you're currently using, the aws sts get-caller-identity command is very helpful.

Example

~ $ aws sts get-caller-identity
{
    "UserId": "AROAEXAMPLE1234567890:example.user",
    "Account": "123456789012",
    "Arn": "arn:aws:sts::123456789012:assumed-role/AWSReservedSSO_AdministratorAccess_example1234567890/example.user"
}
Enter fullscreen mode Exit fullscreen mode

Info: No special IAM permissions are required to run this command.

Top comments (0)