Using fog library of ruby how can I get the account ID of the current authentication? I use access_key_id
and secret_access_key
to authenticate.
You can get this info through get-caller-identity
API of STS service.
In Ruby:
Aws::STS::Client.new(your_oprions).get_caller_identity[:account]