Quick way to get AWS Account number from the cli tools?

0 votes

Looking for a quick way to pull my account number, I had originally thought of using aws iam get-account-authorization-details --max-items 1 but there are several issues with doing it this way. Is there a way to do this that might not cross account origins?

Jul 12, 2018 in AWS by bug_seeker
• 15,350 points
79 views

1 answer to this question.

0 votes

Via "Secure Token Service" using the following command.

aws sts get-caller-identity --output text --query 'Account'

answered Jul 12, 2018 by Priyaj
• 56,900 points

Related Questions In AWS

0 votes
0 answers

transfer the ownership of Amazon S3 objects from one AWS account to another

I want to transfer the ownership of ...READ MORE

5 days ago in AWS by Hannah
• 15,040 points

closed 5 days ago by Kalgi 13 views
+1 vote
2 answers
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
+1 vote
3 answers

How to get ARN for s3 Bucket using aws cli .

An ARN is a non-opaque, constructible identifier, ...READ MORE

answered Aug 16, 2018 in AWS by Priyaj
• 56,900 points
1,410 views
0 votes
1 answer

How to get AWS account/service cost using CloudWatch API?

You can check this link for a ...READ MORE

answered Jul 13, 2018 in AWS by Priyaj
• 56,900 points
151 views