How SSL/TLS works · Lesson 5 of 8 · 5 min read
TLS on AWS
AWS Certificate Manager (ACM)
- Issues free public certificates for use with integrated services: ALB, NLB (TLS listeners), CloudFront, API Gateway, App Runner, Elastic Beanstalk. Standard ACM public certificates can't be exported, so you can't install them on your own EC2 Nginx; since 2025 ACM also offers paid exportable public certificates for that case.
- DNS validation (recommended): ACM gives you a CNAME record; with Route 53 it's one click / one Terraform resource. As long as the CNAME stays, ACM renews automatically. Since February 2026, new ACM public certificates are valid for 198 days and are renewed 45 days before they expire. Email validation exists but renewal needs human action.
- Region matters: certificates are regional. A certificate for CloudFront must be in us-east-1; for an ALB in Mumbai it must be in ap-south-1.
- You can import third-party certificates (you're responsible for renewal; ACM emits expiry events).
- AWS Private CA issues private certificates for internal services, mTLS clients, and IoT — usable directly or through cert-manager's AWS PCA issuer.
Enlarge diagram
Swipe sideways to see all of it, or tap to open it full screen.
resource "aws_acm_certificate" "shop" {
domain_name = "shop.example.com"
subject_alternative_names = ["www.shop.example.com"]
validation_method = "DNS"
lifecycle { create_before_destroy = true }
}
resource "aws_route53_record" "shop_validation" {
for_each = { for o in aws_acm_certificate.shop.domain_validation_options : o.domain_name => o }
zone_id = var.zone_id
name = each.value.resource_record_name
type = each.value.resource_record_type
records = [each.value.resource_record_value]
ttl = 300
}
resource "aws_acm_certificate_validation" "shop" {
certificate_arn = aws_acm_certificate.shop.arn
validation_record_fqdns = [for r in aws_route53_record.shop_validation : r.fqdn]
}
Where TLS terminates
| Pattern | How | When |
|---|---|---|
| Terminate at ALB | HTTPS listener with ACM cert; ALB → targets over HTTP | Most web apps; traffic inside the VPC is plain text |
| Re-encrypt (end-to-end) | HTTPS listener + HTTPS target group; targets have their own (often self-signed/private CA) certs | Compliance requires encryption to the instance/pod. ALBs don't validate target certificates, so self-signed works |
| TLS listener on NLB | NLB terminates TLS (ACM cert), forwards TCP or re-encrypts | Non-HTTP TLS protocols, static IPs |
| TLS passthrough on NLB | TCP listener on 443; the backend terminates TLS | You need the cert on the backend (mTLS with client certs, custom TLS handling) |
| CloudFront | Viewer TLS at the edge (us-east-1 cert), origin TLS to ALB/S3 | Global apps, caching, DDoS absorption |
| Service mesh | ALB/ingress terminates external TLS; mesh mTLS between pods | Zero-trust inside the cluster |
Security policies on ALB/NLB/CloudFront select protocols and ciphers. Choose a modern policy (e.g. ELBSecurityPolicy-TLS13-1-2-2021-06: TLS 1.3 + 1.2 with strong ciphers) to disable TLS 1.0/1.1. Redirect HTTP to HTTPS with a port-80 listener whose default action is a 301 redirect, and send HSTS headers from the app (Strict-Transport-Security: max-age=31536000; includeSubDomains) so browsers never try plain HTTP again.
Enlarge diagram
Swipe sideways to see all of it, or tap to open it full screen.
EKS ingress with ACM
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: shop
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80},{"HTTPS":443}]'
alb.ingress.kubernetes.io/ssl-redirect: "443"
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:ap-south-1:123456789012:certificate/abc-123
alb.ingress.kubernetes.io/ssl-policy: ELBSecurityPolicy-TLS13-1-2-2021-06
spec:
ingressClassName: alb
rules:
- host: shop.example.com
http:
paths:
- { path: /, pathType: Prefix, backend: { service: { name: shop, port: { number: 80 } } } }
The AWS Load Balancer Controller can also auto-discover ACM certificates matching the Ingress hosts.