cloud-custodian / cloud-custodian

Rules engine for cloud security, cost optimization, and governance, DSL in yaml for policies to query, filter, and take actions on resources

Home Page:https://cloudcustodian.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can I run Lambda cross region/account

victorh3 opened this issue · comments

Running custodian on lambda scheduled mode. Function is deployed on us-east-1, but can I make this same function run on us-west-2? Expanding to other accounts if we have consolidated billing? I'd rather have 1 lambda function than 10+ for each account and region

lambda policies are deployed to a particular region, and are currently bound to that region. to deploy to multiple regions, run custodian against that region to deploy a separate lambda function there. for regions that don't support lambda, lambda policies can't be employed and a poll policy (default) should be used. cross account lambda policies are not supported. there's some back story there that should be re-verified, namely when cloudwatch events was first released that it didn't support cross account targets, ditto for config. note that even then neither of those is zero footprint, as they rely on the target account and region having a cloudwatch event or config rule.