WAF-COST-040 – Storage & Retention Lifecycle Defined
Beschreibung
Alle Storage-Ressourcen (S3-Buckets, Azure Storage, GCS-Buckets) MÜSSEN explizite Lifecycle-Regeln haben.
Alle Log-Gruppen MÜSSEN retention_in_days != 0 und != null haben.
Kein Storage- oder Log-Ressource darf ohne explizite, endliche Retention provisioniert werden.
Infinite Retention wird als Architektonische Kostenschuld klassifiziert (Kostenschuld).
Rationale
Storage-Kosten wachsen linear und ungebunden ohne Lifecycle-Policies.
CloudWatch Log Groups mit retention_in_days = 0 (der Default) speichern Logs unbegrenzt –
ein Pattern, das in schlecht gemanagten Umgebungen dazu führt, dass Observability-Kosten
die Compute-Kosten übersteigen.
Lifecycle-Policies sind die kosteneffektivste präventive Maßnahme im Cloud-Cost-Management: Einmaliger IaC-Aufwand, dauerhafter und wachsender Einsparungseffekt.
Bedrohungskontext
| Risiko | Beschreibung |
|---|---|
Unbegrenzte Storage-Kosten |
S3-Buckets ohne Lifecycle akkumulieren Daten über Jahre; Kosten wachsen ohne Kontrolle. |
Observability-Kostendominanz |
CloudWatch-Default (infinite) macht Log-Kosten zur größten Kostenposition nach Compute. |
Vergessene Snapshots |
EBS-Snapshots und RDS-Snapshots wachsen unbegrenzt, wenn kein Cleanup-Policy existiert. |
DSGVO-Risiko |
Daten, die länger als notwendig gespeichert werden, verstoßen gegen das Prinzip der Datensparsamkeit. |
Anforderung
-
Jede
aws_s3_bucket-Ressource MUSS eineaws_s3_bucket_lifecycle_configurationhaben -
Jede
aws_cloudwatch_log_groupMUSSretention_in_daysmit Wert >= 1 haben -
4-Tier-Modell MUSS dokumentiert sein: Hot (7–30d), Warm (30–90d), Cold (90–365d), Archive (>365d)
-
Unvollständige Multipart-Uploads MÜSSEN nach ⇐ 3 Tagen abgebrochen werden
Reifegrad-Abstufung
| Level | Bezeichnung | Kriterien |
|---|---|---|
1 |
Keine Lifecycle-Policies |
S3-Buckets ohne Lifecycle; CloudWatch-Default (infinite). |
2 |
Einige Retention-Werte gesetzt |
Größte Kostentreiber mit Retention konfiguriert; kein systematischer Ansatz. |
3 |
Alle Ressourcen mit Lifecycle in IaC |
Jeder S3-Bucket hat Lifecycle-Konfiguration; jede Log Group hat |
4 |
Tiered Storage automatisiert |
Log-Tiering implementiert; Storage-Kostentrend monatlich überwacht. |
5 |
Value-basiertes Intelligent Tiering |
S3 Intelligent-Tiering; Log-Value-Analyse; automatisierte Tiering-Optimierung. |
Terraform Checks
waf-cost-040.tf.aws.s3-lifecycle-rule-defined
Prüft: S3-Buckets müssen eine Lifecycle-Configuration haben.
| Compliant | Non-Compliant |
|---|---|
|
|
waf-cost-040.tf.aws.cloudwatch-log-retention-not-zero
Prüft: CloudWatch Log Groups müssen retention_in_days >= 1 haben.
| Compliant | Non-Compliant |
|---|---|
|
|
Remediation: retention_in_days auf alle Log Groups setzen.
Empfohlen: operational=30, security-audit=365. Nie 0 oder leer lassen.
Evidenz
| Typ | Pflicht | Beschreibung |
|---|---|---|
IaC |
✅ Pflicht |
Terraform Storage-Ressourcen mit expliziten Lifecycle-Regeln. |
IaC |
✅ Pflicht |
Terraform CloudWatch Log Group-Ressourcen mit |
Governance |
Optional |
Retention-Strategie-Dokument ( |
Config |
Optional |
AWS Config-Report: S3-Buckets ohne Lifecycle-Policy (Ziel: 0). |
Regulatorisches Mapping
| Framework | Controls |
|---|---|
ISO 27001:2022 |
A.5.36 – Compliance with policies, rules and standards; A.8.1.1 – Access control strategy; A.8.10 – Information deletion; A.8.24 – Use of cryptography |
ISO 20000-1:2018 |
9.4.1 – Configuration management; 9.4.2 – Configuration records; 10.2.2 – Financial management; 10.2.4 – Budgeting and accounting |
BSI C5:2020 |
COM-01 – Network and service security; COM-02 – Cloud monitoring; GOV-01 – Governance, risk and compliance |
AWS Well-Architected Framework |
Cost Optimization Pillar – Cost allocation tagging; Financial Security – Budgeting and forecasting |
Azure Well-Architected Framework |
Cost management – Tagging; Governance – Resource governance; Cost optimization – Cost allocation |
Google Cloud Architecture Framework |
Organization and folders – Tagging; Billing – Cost allocation; Resource management – Resource hierarchy |
FinOps Foundation |
Core Module – Tagging standards; Management Layer – Cost attribution; Open Module – Financial accountability |
GDPR |
Art. 28 – Processor obligations; Art. 32 – Security of processing (cost of security measures) |
CSRD |
ESRS G1 – Governance – Disclosure of information; ESRS M1 – Materiality – Disclosure of information |
NIST CSF 2.0 |
GV.PO – Policy; FR.AN – Analysis; RP.RP – Recovery planning |
CIS Controls v8 |
CIS 2 – Inventory and Control of Software Assets; CIS 2.1 – Software inventory; CIS 2.2 – Hardware inventory |
TISAX |
Information security – Resource management |
ANSSI SecNumCloud |
Domain – Financial management; Domain – Resource management |
BIO |
BIO – Financieel beheer |
ENS High |
org.2 – Control de gestión; op.exp.1 – Gestión de incidentes |
UK NCSC CAF |
A2 – Financial management; A3 – Resource management |
CMMC 2.0 |
AC.L2-3.1.1 – Access control policy |
IRAP |
ISM – Financial management |
CCCS PBMM |
CM-6 – Configuration management |
MAS TRM |
Ch.6 – Financial management |
ISMAP |
Resource management and cost control |
FISC |
Operational measures – Financial management |