Skip to main content
emnode / learn
Compliance

Enforce TLS on load balancer listeners

One capability across Classic, Application and Network Load Balancers: every public listener terminates TLS, plain HTTP redirects to HTTPS, and weak ciphers are off.

13 min·10 sections·AWS

Last reviewed

Remediates AWS Security Hub: ELB.1ELB.3ELB.8ELB.18ELBv2.1

Encrypted listeners: the basics

What makes a load balancer listener "unencrypted"?

A load balancer listener is a port-plus-protocol pair that accepts incoming traffic on behalf of a target group. Application Load Balancers (ALBs) speak HTTP or HTTPS; Network Load Balancers (NLBs) speak TCP, UDP or TLS; Classic Load Balancers (CLBs) speak HTTP, HTTPS, TCP or SSL. The protocol decides one thing above all: whether the hop between the client and the load balancer is encrypted. An HTTP listener on an internet-facing ALB sends every credential, session cookie and payload across the public network in clear text.

Security Hub turns this single idea into several controls because the load balancer family is sprawling. ELB.1 and ELBv2.1 fail an ALB whose HTTP requests are not redirected to HTTPS; ELB.18 fails ALB and NLB listeners that are not configured with HTTPS or TLS termination; ELB.3 fails a Classic Load Balancer listener that does not use HTTPS or SSL; and ELB.8 fails a Classic SSL listener that is not using a recommended, strong security policy. They look like separate findings, but they are one capability: no listener in front of users should accept plaintext, and the ones that terminate TLS should do it with a modern cipher set.

The fix is cheap and standard. AWS Certificate Manager issues free, auto-renewing TLS certificates, and TLS termination on a modern load balancer adds a rounding-error amount of compute. The work is not the cost, it is the sequence: add the HTTPS or TLS listener with a strong SslPolicy first, then redirect the HTTP listener rather than deleting it, so old links and bookmarks keep working while the cleartext path closes.

In this lesson you will learn how AWS expresses listener encryption across Classic, Application and Network load balancers, how to provision an ACM certificate and attach it to an HTTPS or TLS listener with a strong security policy, and how to use the HTTP-to-HTTPS redirect pattern so old links keep working without leaving cleartext on the wire. The Controls this lesson covers section lists every Security Hub control in this capability, each linking to a deep page with the exact check and a copy-and-paste fix.

Fun fact

Free certs, cached redirects, no excuses

Before AWS Certificate Manager launched in 2016, a wildcard TLS certificate from a public CA cost hundreds to over a thousand dollars a year and had to be renewed by hand, which is why so many sites just shipped HTTP. ACM made certificates free, auto-renewing and tied to DNS validation, removing the single most common excuse for cleartext listeners. The second detail teams miss is the redirect status code: an HTTP 301 (Moved Permanently) is cached by the browser, so the next visit jumps straight to HTTPS without ever touching port 80, while a 302 is temporary and never cached, so every visit still makes a plaintext request first. Always use HTTP_301.

Finding plaintext listeners across an estate

Marco runs the platform team at a fintech. A quarterly compliance review lights up with ELB findings across the marketing and staging accounts: ALBs running plain HTTP:80 listeners and a Classic Load Balancer still on an SSL listener with a stale security policy.

Rather than work each finding alone, he lists the listeners on the worst offender first, a production-adjacent ALB fronting the corporate website, so he can see the protocol, port and any attached certificate, the three things that decide whether the listener controls fail.

List the listeners on the flagged ALB, sliced to protocol, port and any attached certs.

$ aws elbv2 describe-listeners --load-balancer-arn arn:aws:elasticloadbalancing:eu-west-1:123456789012:loadbalancer/app/marketing-www/abc123 --query 'Listeners[*].{Proto:Protocol,Port:Port,Certs:Certificates[*].CertificateArn}' --output table
------------------------------------------
| Proto | Port | Certs |
------------------------------------------
| HTTP | 80 | None |
------------------------------------------
# Single HTTP listener, no HTTPS sibling, no certificate. Textbook listener failure.

An HTTP listener with no HTTPS sibling and no cert is exactly what the listener controls fail on.

How encrypted listeners actually workdeep dive

An HTTPS listener on an ALB, or a TLS listener on an NLB, terminates TLS at the load balancer itself. The load balancer holds the private key, presents the certificate during the handshake, decrypts the traffic and forwards it to the target group. The certificate is attached to the listener by its ACM ARN; ACM keeps the private key out of your hands entirely, which is also why ACM certificates can only be used with AWS-integrated services. ALB and NLB listeners support Server Name Indication, so a single listener can serve many certificates and pick the right one per hostname at handshake time.

Each TLS listener also carries an SslPolicy that pins the allowed protocol versions and cipher suites. AWS publishes named policies; ELBSecurityPolicy-TLS13-1-2-2021-06 is the current sensible default, enabling TLS 1.3 and disabling deprecated ciphers. This is why the capability has two layers: ELB.18 and ELBv2.1 are about whether the listener encrypts at all, while ELB.8 (Classic) is about whether the policy it uses is strong. Pinning a stale policy with TLS 1.0/1.1, RC4 or 3DES fails the policy check even after you have added an encrypted listener.

The redirect controls work on the data plane. An ALB listener's default action can be forward, fixed-response or redirect; ELBv2.1 and ELB.1 fail when an HTTP:80 listener's default action is anything other than a redirect to HTTPS. The redirect runs entirely on the load balancer with no compute or Lambda, and the RedirectConfig placeholders #{host}, #{path} and #{query} are substituted at request time so one rule preserves the full URL. The check is on the default action, so path-based rules (for example an ACME HTTP-01 challenge) can still forward without failing the control.

What is the impact of an unencrypted listener?

The direct impact is interception. Any network hop between the client and the load balancer, a coffee-shop wifi access point, a hostile ISP, a misconfigured corporate proxy, can read every request and response. Session cookies are the highest-value target: an attacker with a cookie can impersonate the user without ever needing the password, and the application cannot tell the difference. A single plaintext request after login leaks the session cookie unless the cookie is marked Secure, which most frameworks do not set by default.

The second-order impact is regulatory and contractual. PCI DSS requirement 4 mandates strong cryptography for cardholder data in transit over public networks; HIPAA's transmission-security rule requires it for PHI; SOC 2 CC6.7 and GDPR Article 32 cover it too. A plaintext listener on an internet-facing load balancer is one of the easiest audit findings a regulator or QSA will ever write up, and it blocks attestations until it is closed.

There is also a usability and trust impact. Browsers mark HTTP pages as Not secure, search ranking has used HTTPS as a signal for a decade, and modern web APIs refuse to run on insecure origins. Even when the data is not sensitive, a plaintext listener degrades the product and the brand.

The cost story is the easy one. ACM certificates are free, TLS termination overhead on a modern load balancer is typically under a dollar a month, and the migration, adding HTTPS plus a redirect, is non-disruptive to existing traffic. There is no infrastructure rebuild and no material budget ask, which is exactly why leaving the HTTP listener in place is never a cost decision.

How do you safely move listeners to HTTPS/TLS?

Work the capability as one loop. The order matters: add the encrypted listener before removing the plaintext one, redirect rather than delete so old links survive, and pick a strong security policy so you do not trip the cipher check.

1. Inventory every plaintext listener across the account

Walk every ALB, NLB and Classic Load Balancer and list listeners where the protocol is HTTP or TCP, or where a Classic SSL listener uses a stale security policy. Tag each load balancer with the public DNS name it serves, because you will need that name when requesting the certificate. Separate internet-facing production load balancers from internal and staging ones so the regulated exposure is clear.

2. Provision an ACM certificate with DNS validation

Request the certificate with aws acm request-certificate --validation-method DNS, drop the validation CNAME into Route 53 and wait for ISSUED. DNS validation auto-renews the certificate as long as the record stays in place, with no human in the loop. If the domain lives outside Route 53 the CNAME still works, you just publish it manually.

3. Add the encrypted listener with a strong policy, then redirect HTTP

Create the HTTPS:443 (or TLS) listener with the certificate attached and SslPolicy set to a current TLS 1.2/1.3 policy such as ELBSecurityPolicy-TLS13-1-2-2021-06. Then, instead of deleting the HTTP:80 listener, modify its default action to a 301 redirect to https://#{host}#{path}?#{query}. Old links and bookmarks bounce to HTTPS automatically, and the listener controls pass because there is now an encrypted sibling and a strong policy.

4. Prevent recurrence with AWS Config and IaC defaults

Enable the managed Config rule alb-http-to-https-redirection-check so any new ALB without a redirect fires within minutes, and pair it with elb-tls-https-listeners-only for NLBs. For prevention rather than detection, codify the listener in your IaC module so an HTTP listener cannot ship without a redirect, and an SCP can deny creating an HTTP listener on an internet-facing load balancer outright.

# 1. Create the HTTPS listener with the issued ACM cert and a strong TLS policy.
aws elbv2 create-listener \
  --load-balancer-arn arn:aws:elasticloadbalancing:eu-west-1:123456789012:loadbalancer/app/marketing-www/abc123 \
  --protocol HTTPS --port 443 \
  --certificates CertificateArn=arn:aws:acm:eu-west-1:123456789012:certificate/d4f8c1a2 \
  --ssl-policy ELBSecurityPolicy-TLS13-1-2-2021-06 \
  --default-actions Type=forward,TargetGroupArn=arn:aws:elasticloadbalancing:eu-west-1:123456789012:targetgroup/marketing-www/tg789

# 2. Convert the existing HTTP listener into a 301 redirect to HTTPS (preserves the URL).
aws elbv2 modify-listener \
  --listener-arn arn:aws:elasticloadbalancing:eu-west-1:123456789012:listener/app/marketing-www/abc123/def456 \
  --default-actions 'Type=redirect,RedirectConfig={Protocol=HTTPS,Port=443,Host="#{host}",Path="/#{path}",Query="#{query}",StatusCode=HTTP_301}'

Quick quiz

Question 1 of 5

Security Hub shows listener findings across ALBs, an NLB and a Classic Load Balancer. What is the most efficient way to think about them?

You can now treat load balancer encryption as one capability rather than a scatter of findings: inventory every plaintext listener across ALB, NLB and Classic load balancers, provision a free ACM certificate, add the encrypted listener with a strong security policy, redirect HTTP to HTTPS with a 301 so old links survive, and codify the standard in AWS Config and IaC so new load balancers ship compliant. The Controls this lesson covers section below links every control in this group to its deep page and fix.

Back to the library

Controls this lesson covers

One capability, many AWS Security Hub controls. This lesson is the shared playbook; each control below keeps its own deep page with the exact check, severity and a copy-and-paste fix.