How do you check which identity and account the CLI is using?
BeginnerProductionRapid-Fire AWS CLI
Answer
aws sts get-caller-identity
aws configure list # where each setting comes from
aws configure list-profiles
export AWS_PROFILE=prod-readonly # switch profile for this shell
More on Rapid-Fire AWS CLI
How do you log in with Identity Center (SSO) from the CLI?BeginnerHow do you assume a role manually and export the credentials?IntermediateHow do you list running instances with name, ID, type and private IP in a table?BeginnerHow do you find the latest Amazon Linux 2023 AMI without hard-coding an ID?BeginnerHow do you open a shell or port-forward to a private instance without SSH?BeginnerHow do you run a command on a fleet of instances by tag?Beginner