I am using CloudQuery with an AWS master account and syncing 10-20 other accounts flawlessly.
Sometimes, instead of the account ID, I would like to see the actual display name of the account. Is it possible to cross-reference the value somewhere?
I think if you sync the aws_organizations_accounts table you should be able to cross-reference the account ID with the name column for a friendly account name. AWS Organizations Accounts Table
Ok! So I think the issue that you are running into is that Stack Sets do not deploy into the account that they are deployed from. This means that there is no admin/management account that has the ability to call Organizations: ListAccounts, so that is why that table is empty.
In the meantime, I think you can manually create the IAM role in the management account and it will be able to sync all of the desired data. Another option is to add another section to your config to explicitly sync the management account like this:
kind: source
spec:
name: aws-org
tables: [ "*" ]
destinations: ["postgresql"]
spec:
org:
---
kind: source
spec:
name: aws-management-account
tables: [ "*" ]
destinations: ["postgresql"]
spec:
accounts:
# configure your credentials for this account here
- id: aws-management-account
In order for a role to call organizations:ListAccounts, it must have a policy attached to it that gives it permissions (like the policy you screenshotted), but it also must:
be called only from the organization's management account or by a member account that is a delegated administrator for an Amazon Web Services service.
I am a bit confused. I am an admin using the member “cloudquery-ro” when syncing, but using my account to use it. Is it me that needs delegated administrator rights or “cloudquery-ro”?