Enforcing Encryption in Transit at Each Hop
This lesson explains how encryption in transit is configured, and often enforced, at each hop from client to edge, load balancer, target, data store and AWS APIs.
Learning outcomes
After completing this lesson, you will be able to:
- Configure TLS on load balancers and CloudFront.
- Require TLS with policies and parameters.
- Explain encryption for private and hybrid connections.
Load balancers and CloudFront
An ALB terminates HTTPS on its listener with an ACM certificate and a security policy that defines allowed TLS versions and ciphers; choose a policy that supports TLS 1.2 and 1.3 only, such as ELBSecurityPolicy-TLS13-1-2-2021-06, or a FIPS or post-quantum variant when required. An HTTP listener with a redirect action to HTTPS ensures clients use TLS. Traffic from the ALB to targets can use HTTPS target groups for end-to-end encryption. An NLB can terminate TLS with a TLS listener or pass it through with a TCP listener so the targets terminate it. CloudFront's viewer protocol policy (Redirect HTTP to HTTPS or HTTPS only) protects the viewer connection, the origin protocol policy protects the origin connection, and a minimum TLS version is set on the distribution.
Requiring TLS with policies and parameters
Several services can reject unencrypted connections. An S3 bucket policy denies requests where aws:SecureTransport is false, and can require a minimum TLS version with s3:TlsVersion. RDS for PostgreSQL uses the parameter rds.force_ssl=1, RDS for MySQL require_secure_transport=ON and SQL Server rds.force_ssl; clients need the RDS certificate authority bundle, and certificate authority rotations require updating client trust stores. ElastiCache supports in-transit encryption chosen at creation (or enabled on existing Valkey and Redis OSS clusters), and EFS mounts with the tls option through amazon-efs-utils. SQS and SNS can deny non-TLS requests with aws:SecureTransport conditions.
{
"Sid": "DenyInsecureTransport",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": ["arn:aws:s3:::acme-data", "arn:aws:s3:::acme-data/*"],
"Condition": {"Bool": {"aws:SecureTransport": "false"}}
}The following diagram shows each control refusing a plain connection.

Requiring TLS
Private and hybrid connections
Traffic between VPCs over peering or Transit Gateway inside AWS is encrypted at the physical layer between AWS facilities on supported instance types, but applications should still use TLS for sensitive data. Site-to-Site VPN and Client VPN encrypt traffic with IPsec and TLS respectively. The following table summarises the enforcement points.
| Hop | Enforcement |
|---|---|
| Browser to CloudFront | Viewer protocol policy HTTPS only or redirect; minimum TLS version |
| CloudFront to origin | Origin protocol policy HTTPS only |
| Client to ALB | HTTPS listener, TLS 1.2+ security policy, HTTP-to-HTTPS redirect |
| ALB to target | HTTPS target group |
| Application to S3 | Bucket policy aws:SecureTransport and s3:TlsVersion |
| Application to RDS | rds.force_ssl / require_secure_transport and CA bundle |
| On premises to VPC | Site-to-Site VPN (IPsec) or Client VPN (TLS) |
Failing database connections after a CA rotation
After an RDS certificate authority update, several Java applications fail to connect with PKIX path building failed, while others work. The failing applications pin the old RDS root certificate in their trust stores. The team downloads the current RDS global CA bundle, updates the trust stores through the deployment process, and adds a reminder to check AWS Health events for future CA expiry notices. Disabling TLS would have restored connectivity but violated the requirement to encrypt in transit.
Which policy condition denies unencrypted requests to an S3 bucket?
Show answer
aws:SecureTransport set to false in a Deny statement.
Exam Tips
Remember for the exam
- Use HTTPS listeners with TLS 1.2+ security policies and redirect HTTP to HTTPS.
- Deny aws:SecureTransport false in S3, SQS and SNS policies.
- Force TLS on RDS with rds.force_ssl or require_secure_transport; clients need the CA bundle.
- CloudFront has separate viewer and origin protocol policies.