Skip to main content

NPM version PyPI version Release

cdk-organizations-list-accounts

Want to keep an up-to-date list of your AWS accounts?

cdk-organizations-list-accounts is an AWS CDK building library that outputs a list of AWS organization accounts in CSV format.

Overview

Amazon EventBridge detects the account creation event and starts a Lambda function. An accounts list, including the organization structure, will be output to S3 bucket in CSV format.

Output Example:

Id,Name,Email,Status,Joined Method,Joined Timestamp,OU Id,1st Level OU,2nd Level OU,3rd Level OU,4th Level OU,5th Level OU
000000000000,account-mgmt,account+mgmt@example.com,ACTIVE,INVITED,2022-01-31 07:19:57,r-xxxx
111111111111,account-0001,account+0001@example.com,ACTIVE,INVITED,2022-01-31 07:25:38,ou-xxxx-yyyyyyyy,Suspended
222222222222,account-0002,account+0002@example.com,ACTIVE,CREATED,2022-01-31 07:31:28,ou-xxxx-zzzzzzzz,Sample System,Additional,Workloads,Prod
333333333333,account-0003,account+0003@example.com,ACTIVE,CREATED,2022-01-31 08:15:49,ou-xxxx-zzzzzzzz,Sample System,Additional,Workloads,SDLC
444444444444,account-0004,account+0004@example.com,ACTIVE,CREATED,2022-01-31 09:18:50,ou-xxxx-zzzzzzzz,Sample System,Foundational,Security,Prod
555555555555,account-0005,account+0005@example.com,ACTIVE,CREATED,2022-01-31 10:21:30,ou-xxxx-zzzzzzzz,Sample System,Foundational,Infrastructure,Prod
666666666666,account-0006,account+0006@example.com,ACTIVE,CREATED,2022-01-31 11:21:05,ou-xxxx-zzzzzzzz,Sample System,Foundational,Infrastructure,SDLC

Limitations at present

  • Must deploy to AWS Organization's management account
  • Events other than CreateAccount are not supported

Getting Started

TypeScript

Installation

$ yarn add cdk-organizations-list-accounts

Usage

import * as cdk from 'aws-cdk-lib';
import { OrganizationsListAccounts } from 'cdk-organizations-list-accounts';

const App = new cdk.App();
const stack = new cdk.Stack(App, 'Stack', { env: { region: 'us-east-1' } });
new OrganizationsListAccounts(stack, 'Organizations-List-Accounts');

Deploy!

$ cdk deploy

Python

Installation

$ pip install cdk-organizations-list-accounts

Usage

import aws_cdk as cdk
from cdk_organizations_list_accounts import OrganizationsListAccounts

app = cdk.App()
stack = cdk.Stack(app, "Stack", env={"region": "us-east-1"})
OrganizationsListAccounts(stack, "Organizations-List-Accounts")
app.synth()

Deploy!

$ cdk deploy

Metadata

Release files for cdk-organizations-list-accounts 1.0.356

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cdk-organizations-list-accounts 1.0.356
File Size Uploaded Provenance Actions
cdk-organizations-list-accounts-1.0.356.tar.gz 30.2 kB Without provenance Details for cdk-organizations-list-accounts-1.0.356.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cdk-organizations-list-accounts 1.0.356
File Interpreter ABI Platform Actions
cdk_organizations_list_accounts-1.0.356-py3-none-any.whl Python 3 none any Details for cdk_organizations_list_accounts-1.0.356-py3-none-any.whl

Total release size: 59.2 kB

Release files / cdk-organizations-list-accounts-1.0.356.tar.gz

Download URL cdk-organizations-list-accounts-1.0.356.tar.gz
Size 30.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3ff9a14903ca2988b0069257e265bc42bb75b8a86fe34a80a2b61580cb3339f7
BLAKE2b-256 checksum
How to use checksums
a844a90cd1f15976d3a8e6f9eb177b93f4fb246d1d1072695cf3929769fa8a87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / cdk_organizations_list_accounts-1.0.356-py3-none-any.whl

Download URL cdk_organizations_list_accounts-1.0.356-py3-none-any.whl
Size 29.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87a52af94f5ba8542e2f5624e0662e5922882799310a99744c45838eb7d18d3d
BLAKE2b-256 checksum
How to use checksums
2acbd4a639bfce2786767c29ccbf0a7c67aad31dabd34bf97ede50920d3b2262
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Security for cdk-organizations-list-accounts 1.0.356

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.356 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page