aws sts get-caller-identityTo get AccountID only, use queries and customize output text
aws sts get-caller-identity --output text --query 'Account'
References:
- https://www.edureka.co/community/9846/quick-way-to-get-aws-account-number-from-the-cli-tools
- https://docs.aws.amazon.com/cli/latest/reference/sts/get-caller-identity.html
Немає коментарів:
Дописати коментар