0 votes
1 view
in AWS by (18.2k points)

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?

1 Answer

0 votes
by (42.5k points)

Secure Token Service subcommand “get-caller-identity” can be used to get the account number, using the following:

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

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...