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
• 14,970 points
42 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,120 points

Related Questions In AWS

+1 vote
2 answers
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Login to AWS from AWS Tools for Powershell

If your IAM user account doesn't already ...READ MORE

answered Jul 18, 2018 in AWS by Priyaj
• 56,120 points
32 views
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,120 points
703 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,120 points
131 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.