WAF-COST-090 – Data Transfer & Egress Cost Management
Beschreibung
VPC Endpoints MÜSSEN für S3, KMS und andere vielgenutzte Cloud-Services deployed sein. Öffentliche IP-Adressen auf internen Compute-Ressourcen sind verboten. CDN MUSS für alle öffentlich zugänglichen statischen Assets konfiguriert sein. Ein Egress-Budget-Alert MUSS existieren. Cross-Region-Datentransfer MUSS minimiert und, wenn notwendig, dokumentiert sein.
Rationale
Datentransfer- und Egress-Kosten gehören zu den am häufigsten unterschätzten Cloud-Kostenkategorien. S3-API-Calls und Datenzugriffe von EC2-Instanzen in derselben Region sind mit VPC Endpoints kostenfrei – ohne sie fallen Egress-Gebühren an. Public IPs auf internen Compute-Ressourcen erzeugen unnötig Internet-Pfad-Traffic. CDN eliminiert wiederholte Origin-Egress-Kosten für statische Inhalte.
VPC Endpoints für S3 (Gateway-Typ) sind kostenlos und haben eines der besten ROI-Verhältnisse aller Cloud-Optimierungsmaßnahmen: Einmaliger Implementierungsaufwand, permanente Einsparung.
Bedrohungskontext
| Risiko | Beschreibung |
|---|---|
Unnötige Egress-Gebühren |
S3/KMS-Traffic ohne VPC-Endpoint läuft über Internet-Gateway und erzeugt Egress-Kosten. |
Public IP auf internen Services |
Interne App-Server mit Public IP erzeugen Internet-Pfad-Traffic statt VPC-intern. |
Fehlende CDN-Nutzung |
Jede Anfrage an statische Assets trifft den S3-Origin; CDN würde 80–90% der Egress eliminieren. |
Multi-Cloud-Datentransferkosten |
Cross-Provider-Datentransfer (AWS zu Azure) ist teuer; wird in Architekturentscheidungen oft ignoriert. |
Anforderung
-
VPC Endpoint für S3 MUSS in jedem genutzten AWS-VPC deployed sein (Gateway-Typ, kostenlos)
-
VPC Endpoint für KMS MUSS in Produktions-VPCs deployed sein (Interface-Typ)
-
Kein
associate_public_ip_address = trueauf internen Compute-Ressourcen -
CloudFront / Azure CDN / GCP Cloud CDN MUSS für öffentlich zugängliche Storage-Assets konfiguriert sein
-
Egress-Budget-Alert MUSS als Teil der allgemeinen Budget-Konfiguration existieren
Reifegrad-Abstufung
| Level | Bezeichnung | Kriterien |
|---|---|---|
1 |
Unkontrollierter Egress |
Kein VPC-Endpoint; kein Egress-Monitoring; keine CDN. |
2 |
Egress-Budget gesetzt |
Egress-Kosten sichtbar; Budget-Alert konfiguriert. |
3 |
VPC Endpoints und CDN deployed |
S3- und KMS-VPC-Endpoints in Produktion; CDN für Public Assets; kein Public IP auf internem Compute. |
4 |
Egress-Anomalie-Detection |
VPC Flow Logs analysiert auf unerwartete Egress-Muster; Cross-Region-Transfer dokumentiert. |
5 |
Data Gravity Optimization |
Workloads automatisch nahe Datenquellen platziert; Multi-Cloud-Transfer-Kosten im Architecture-Board. |
Terraform Checks
waf-cost-090.tf.aws.vpc-endpoint-s3-exists
Prüft: VPC Endpoint für S3 muss in jedem genutzten AWS-VPC existieren.
| Compliant | Non-Compliant |
|---|---|
|
|
waf-cost-090.tf.aws.no-public-ip-internal-compute
Prüft: Interne Compute-Ressourcen dürfen keine Public IPs haben.
| Compliant | Non-Compliant |
|---|---|
|
|
Remediation: associate_public_ip_address = false auf interne EC2-Instanzen.
Private Subnetze nutzen. NAT-Gateway für ausgehenden Internet-Traffic.
ALB/NLB mit Public IP für eingehenden öffentlichen Traffic.
CDN-Konfiguration (CloudFront)
resource "aws_cloudfront_distribution" "assets" {
enabled = true
is_ipv6_enabled = true
origin {
domain_name = aws_s3_bucket.public_assets.bucket_regional_domain_name
origin_id = "s3-public-assets"
origin_access_control_id = aws_cloudfront_origin_access_control.main.id
}
default_cache_behavior {
target_origin_id = "s3-public-assets"
viewer_protocol_policy = "redirect-to-https"
cached_methods = ["GET", "HEAD"]
allowed_methods = ["GET", "HEAD"]
compress = true
forwarded_values {
query_string = false
cookies { forward = "none" }
}
min_ttl = 0
default_ttl = 86400 # 1 Tag Cache
max_ttl = 604800 # 7 Tage Cache
}
tags = module.mandatory_tags.tags
}
Evidenz
| Typ | Pflicht | Beschreibung |
|---|---|---|
IaC |
✅ Pflicht |
VPC-Endpoint-Ressourcen für S3 und KMS in Terraform. |
Config |
✅ Pflicht |
CDN-Konfiguration für öffentlich zugängliche Storage-Assets. |
Config |
Optional |
VPC-Flow-Log-Konfiguration für Egress-Analyse. |
Process |
Optional |
Monatlicher Egress-Kostentrend-Report (Ziel: < 15% des Gesamt-Cloud-Budgets). |
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 |