Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using cross account eventbridge #7179

Closed
SteveL1 opened this issue Mar 24, 2022 · 2 comments
Closed

using cross account eventbridge #7179

SteveL1 opened this issue Mar 24, 2022 · 2 comments

Comments

@SteveL1
Copy link

SteveL1 commented Mar 24, 2022

Ask your question

I am currently deploying dozens of policies to dozens of accounts. The accounts are managed and paid for by individual teams but I responsible for ensuring that all the accounts follow company guidelines and this is causing a couple of concerns.

Firstly the costs (low as they are) are born by the account holders and not by my team. We have had a case where a policy was incorrect and was being launched recursively, meaning that it had millions of invocations when only one was needed! It was my fault, but the team affected was billed. We have tagged the functions with a cost centre to cross-charge the fees but it creates an unnecessary overhead on someone's time to process this.

Secondly, and more importantly, as we don't manage the accounts there is a possibility that someone can remove or update the lambda functions. I redeploy the functions daily but it someone could easily schedule the removal of the functions.

Also, I have found that mugc.py isn't perfect and will sometimes leave old policies behind and reviewing all of the accounts when there is a policy name change can be quite time consuming.

Is there a way to either send eventbridge messages to a central account where the lambda's exist or for custodian to assume a role in a different account and they can be processed there while still remediating in the source account?

Policy

No response

Relevant log/traceback output

No response

@kapilt
Copy link
Collaborator

kapilt commented Apr 29, 2022

yes, you can use member-role in lambda execution modes to cross account role assume. member-role is interpolated with the account id as a template. the setup of the event bridge forwarding is done out of band as a one time activity.

@SteveL1
Copy link
Author

SteveL1 commented May 18, 2022

Hi,

Thanks so much for replying to me.

I wonder if you could expand on how to implement this, i'm not sure what you mean by "member-role is interpolated with the account id as a template"

Setting up eventbridge shouldn't be an issue, but I just need to get Custodian to remediate in the correct account

Thanks

@cloud-custodian cloud-custodian locked and limited conversation to collaborators Jun 1, 2022
@castrojo castrojo converted this issue into discussion #7448 Jun 1, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants