API to obtain AWS account name beside the organization API?

0

I have securityAudit permission for a given account, I want to programmatically obtain the account alias/name for the target account? Closest I can find information is related to "Organizations" api (describe-account), but that can only be used on the target account itself (and only on root organization/delegated account). Is there any other API that I can call to get this information?

1 回答
0
aws sts get-caller-identity --query Account --output text
aws iam list-account-aliases 
profile pictureAWS
专家
kentrad
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则