I come across many S3 buckets... is there a way to tell which AWS account a given S3 bucket was created in? I can only think of iterating through each account I have access to, but I don't have keys for many accounts in our portfolio.
As Tim said this doesnt look possible due to security reasons. None of the CLI APIs look useful for this.
Ideally you should have a parent account and use My-Organization feature to keep track of all accounts (consolidated billing is a good excuse to get all of them under a single umbrella) and also ask account owners to create a cross-account-role with read privileges. Once you have this, you can easily iterate all accounts programmatically and find the relevant info.