Infrastructure for deploying organization-specific S3 buckets with AWS CDK.
maap-organization-buckets/
├── app.py
├── stacks/
│ └── buckets_stack.py
├── organizations/
│ └── organization_name/
│ ├── bucket_policies.py
│ └── lifecycle_rules.py
├── defaults/
│ ├── lifecycle_rules.py
│ └── bucket_policies.py
├── cdk.json
├── pyproject.toml
├── README.md
└── runtime_config.py
app.pydiscovers org names from folders underorganizations/and creates one stack per org.stacks/buckets_stack.pydefines a single-org stack that deploys one bucket.- Bucket naming convention is
nasa-maap-{org}. {org} is derived from the org folder name. defaults/stores baseline bucket policy and lifecycle rules.organizations/stores custom policy statements and lifecycle policies per org.
Each org has:
bucket_policies.py: optional org-specific policy statements.lifecycle_rules.py: optional org-specific lifecycle rules.
Generated bucket names follow:
nasa-maap-<org-name>
-
Install dependencies:
uv sync
-
Add a new org:
- Create
organizations/<org-name>/ - Optionally add
bucket_policies.pyandlifecycle_rules.py
- Create
-
Verify changes:
cdk synth
-
Run pre-commit hooks:
pre-commit run --all-files
-
Commit and push your changes.