AWS-CLI-Commands | Collection of AWS CLI commands for several AWS services | AWS library
kandi X-RAY | AWS-CLI-Commands Summary
kandi X-RAY | AWS-CLI-Commands Summary
Collection of AWS CLI commands for several AWS services.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of AWS-CLI-Commands
AWS-CLI-Commands Key Features
AWS-CLI-Commands Examples and Code Snippets
Community Discussions
Trending Discussions on AWS-CLI-Commands
QUESTION
What is the aws-cli command to verify my login credentials are correct?
What is the whoami
equivalent for the aws-cli?
I'm learning AWS technologies including serverless and using different accounts when working with different teams. I sometimes get errors that are due to using the wrong credentials or not having the permission to do something.
When I run into an error, the first thing I want to do is make sure I'm using the correct credentials, so I want a whoami
command. So:
I want to know that my AWS credentials are valid,
What my AWS IAM login is. The equivalent of
whoami
in Windows or Unix. Obviously, if it just gives me who I am I know I'm valid!What the rights are for the IAM user I'm logged in as. The IAM roles or permissions this IAM user has. See also Roles terms and concepts
So I've searched and found:
Verifying AWS Command Line Interface credentials are configured correctly - which again is similar. It has a link to named profiles which helps by giving me a command that should work aws ec2 describe-instances
which works, and fills #1 from above list.
More searches give
Leads me to: Why am I receiving the error message "You are not authorized to perform this operation" when I try to launch an EC2 instance? - which I think could help me and answer this question but when I try the command:
...ANSWER
Answered 2021-Mar-30 at 16:00Use STS GetCallerIdentity:
Returns details about the IAM user or role whose credentials are used to call the operation.
Run this with awscli, as follows:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install AWS-CLI-Commands
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page