Review the CloudFront TLS security policy

Configure an appropriate minimum TLS version for CloudFront client connections.

Description

On a CloudFront distribution with a custom certificate, viewer_certificate.minimum_protocol_version selects the minimum viewer TLS version and the permitted ciphers.

Potential impact

Older protocols offer weaker protection. Switching from dedicated IPs to SNI also prevents clients without SNI support from connecting.

Remediation

Choose a policy requiring TLS 1.2 or later and verify that required clients can connect to the domain and validate the certificate. The default CloudFront certificate uses the TLSv1 policy.

Examples

Both excerpts use the same ACM certificate in us-east-1. The second changes vip to sni-only and SSLv3 to TLSv1.2_2021. The alias and other distribution settings are omitted.

Before

hcl
resource "aws_cloudfront_distribution" "example" {
  viewer_certificate {
    cloudfront_default_certificate = false
    acm_certificate_arn           = aws_acm_certificate.example.arn
    ssl_support_method            = "vip"
    minimum_protocol_version      = "SSLv3"
  }
}

After

hcl
resource "aws_cloudfront_distribution" "example" {
  viewer_certificate {
    cloudfront_default_certificate = false
    acm_certificate_arn           = aws_acm_certificate.example.arn
    ssl_support_method            = "sni-only"
    minimum_protocol_version      = "TLSv1.2_2021"
  }
}

References