c7n-org: notifications are missing account name
See original GitHub issueDescribe the bug
I’m trying to use c7n-org
to run custodian against numerous accounts. I’m also using c7n-mailer
to delivery notifications to slack. The messages come through with a blank Account
section.
My c7n-org config looks roughly like this:
accounts:
- account_id: '123456789012'
name: my-account
regions:
- all
role: arn:aws:iam::123456789012:role/my-role
The messages being published to SQS looks like this:
{
"account_id": "123456789012",
"account": "",
...
}
I’d expect "my-account"
to show up in the account
field.
To Reproduce
- setup c7n-org and c7n-mailer
- configure c7n-org as above
- run a policy that sends a notification
Expected behavior The account name should be passed through from the c7n-org config.
Background (please complete the following information):
I’m using the docker image cloudcustodian/c7n:0.9.11.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
c7n-mailer not showing Account number (AWS) #4887 - GitHub
Using both Slack and email notifications with c7n-mailer and c7n-org and I am unable to see the Account field getting populated.
Read more >c7n-org: Multi Account Custodian Execution
Selecting accounts, regions, policies for execution¶. You can filter the accounts to be run against by either passing the account name or id...
Read more >cloud-custodian/cloud-custodian - Gitter
Is it possible for a lambda policy in another account that's been run by c7n-org send notifications using the sqs queue in another...
Read more >Recently Active 'cloudcustodian' Questions - Stack Overflow
I have multiple c7n-org policies to be run in all regions in a list of accounts. Locally I can do this easily with...
Read more >Cloud Custodian — Overview and deployment of ... - Medium
Verify that no new connections has been made to the database and send ... nb: if you only have one AWS account, all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
ohh, sorry - I’ve confused the account name and the account alias. It’d be nice for c7n-org to pull the name from organizations, but that’s obviously not a bug.
Thanks for your help!
account name is pulled fromthe iam alias for the account, name in organizations api should be related, account name in the config file is mostly for targeting, you can use it in the accounts variables and then have it rendered in your policy ala subject on notify.