Public ALB in front of private targets: what are the security details people miss?
IntermediateProductionVPC and Network Design
Answer
- Targets accept traffic only from the ALB security group.
- HTTPS listener with a modern TLS policy (for example
ELBSecurityPolicy-TLS13-1-2-2021-06), HTTP redirects to HTTPS. routing.http.drop_invalid_header_fields.enabled = true.- Access logs to S3, deletion protection on.
- WAF web ACL attached.
- If behind CloudFront, restrict the ALB to the CloudFront managed prefix list and validate a secret custom header, or use CloudFront VPC origins so the ALB can be internal.
More on VPC and Network Design
Walk through a production VPC layout for a multi-tier app.BeginnerHow do you size VPC CIDRs to avoid painting yourself into a corner?IntermediateOne NAT gateway or one per AZ?BeginnerWhat are the biggest levers to reduce NAT gateway cost?IntermediateWhich VPC endpoints do you create by default in a private EKS or ECS VPC?IntermediateHow do you lock down what can go through a VPC endpoint?Advanced