Description
Ensure that Application Load Balancer (ALB) listeners either use HTTPS directly, or, if an HTTP listener is retained for compatibility, are configured with a default action that redirects all HTTP traffic to the equivalent HTTPS listener, so that clients are never served content over an unencrypted connection.
Rationale
An HTTP listener that serves content directly, rather than redirecting to HTTPS, allows client traffic, including headers, cookies, and request/response bodies, to be transmitted unencrypted, exposing it to interception. Configuring the HTTP listener to redirect to HTTPS ensures that any client that initially connects over HTTP (for example, by typing a bare domain name into a browser) is automatically upgraded to an encrypted connection before any application data is exchanged.
Impact
Ensures all client traffic ultimately traverses an encrypted HTTPS connection
Preserves compatibility for clients or bookmarks that default to HTTP, by redirecting rather than breaking the connection
Requires a valid ACM certificate on the HTTPS listener matching the domain name(s) served
Default Value
There is no restriction by default; an ALB's HTTP listener can be configured to serve content directly unless a redirect action is explicitly configured.
Pre-Requisites
An ACM certificate matching the ALB's domain name(s), attached to an HTTPS listener
IAM permissions to update listener rules (elasticloadbalancing:ModifyListener, elasticloadbalancing:CreateListener)
Test Plan
Sign in to the AWS Management Console at https://console.aws.amazon.com.
Navigate to EC2 > Load Balancers and select the Application Load Balancer to review.
Open the Listeners and rules tab.
Verify that an HTTPS (port 443) listener exists with a valid certificate attached.
For any HTTP (port 80) listener, verify its default action is set to Redirect to HTTPS (or the listener does not exist at all if HTTP is fully disabled).
If an HTTP listener serves content directly rather than redirecting, follow the implementation steps.
Implementation Steps
Sign in to the AWS Management Console at https://console.aws.amazon.com.
Navigate to AWS Certificate Manager and request or import a certificate matching the ALB's domain, if not already available.
Navigate to EC2 > Load Balancers and select the Application Load Balancer to update.
If no HTTPS listener exists, select Add listener, configure it for HTTPS on port 443, attach the certificate, and define the appropriate forward action to the target group.
Select the HTTP (port 80) listener, edit its default action, and change it to Redirect to a URL configured for HTTPS on port 443, with a 301 (permanent) status code.
Save the changes and verify that HTTP requests are now redirected to HTTPS successfully.
Backout Plan
Sign in to the AWS Management Console at https://console.aws.amazon.com.
Navigate to EC2 > Load Balancers and select the affected Application Load Balancer.
Select the HTTP listener, edit its default action, and change it back to Forward to the target group instead of Redirect, if reverting is required.
Save the changes.
Reference
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-update-rules.html