Skip to main content

Cloud Custodian - Multi Account

Project description

## What is c7n-org?

c7n-org is a tool to run custodian against multiple accounts at once.

## Installation

```shell
pip install c7n-org
```

c7n-org has 3 run modes:

```shell
Usage: c7n-org [OPTIONS] COMMAND [ARGS]...

custodian organization multi-account runner.

Options:
--help Show this message and exit.

Commands:
report report on a cross account policy execution.
run run a custodian policy across accounts
run-script run an aws script across accounts
```

In order to run c7n-org against multiple accounts, a config file must first be created containing pertinent information about the accounts:

```yaml
accounts:
- account_id: '123123123123'
name: account-1
regions:
- us-east-1
- us-west-2
role: arn:aws:iam::123123123123:role/CloudCustodian
tags:
- type:prod
- division:some division
- partition:us
- scope:pci
...
```

## Running a Policy with c7n-org

To run a policy, the following arguments must be passed in:

```shell
-c | accounts config file
-s | output directory
-u | policy
```


```shell
c7n-org run -c custodian-all-us.yml -s output -u test.yml --dryrun
```

After running the above command, the following folder structure will be created:

```
output
|_ account-1
|_ us-east-1
|_ policy-name
|_ resources.json
|_ custodian-run.log
|_ us-west-2
|_ policy-name
|_ resources.json
|_ custodian-run.log
|- account-2
...
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

c7n_org-0.2.2.tar.gz (6.2 kB view details)

Uploaded Source

File details

Details for the file c7n_org-0.2.2.tar.gz.

File metadata

  • Download URL: c7n_org-0.2.2.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for c7n_org-0.2.2.tar.gz
Algorithm Hash digest
SHA256 f20b0368175111e5566e3b3d96c564b49f50bb5a7e930abe0bb569c6607ea0ad
MD5 dc00114f89a12ab3fd96e4d9ca87f19c
BLAKE2b-256 42cbc6772f5efff803010c1f6fe89bc883f74ebe45922db1d4506a17a724d709

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page