Hands-On with the New Amazon CloudFront Viewer ISP and TLS Details Headers
Deploy a CloudFront probe that logs viewer ISP and TLS details to identify post-quantum, classical, and TLS 1.2 clients before enforcing TLS 1.3 only.
DevOps Engineer
In October 2026, Amazon Web Services announced two new optional Amazon CloudFront headers:
CloudFront-Viewer-ISP and CloudFront-Viewer-TLS-Details . CloudFront-Viewer-ISP provides the viewer's internet service provider name. CloudFront-Viewer-TLS-Details provides TLS version, cipher suite, handshake type, key exchange group, signature scheme, and certificate public key type.The TLS Details header can show whether a connection used a post-quantum hybrid key exchange. This matters because CloudFront can support post-quantum TLS while some viewers still use a classical key exchange.
In this post, I build a small CloudFront readiness probe. It shows which clients use post-quantum TLS, which clients use classical TLS, and which clients would fail if a distribution moved to TLS 1.3 only.
Why build a readiness probe?
Amazon CloudFront added hybrid post-quantum key exchange support in September 2025. AWS also added
TLSv1.3_2025 , a CloudFront security policy that allows TLS 1.3 only.Post-quantum key exchange requires TLS 1.3. A TLS 1.2 viewer cannot use it.
This creates a practical migration question:
Can I move a CloudFront distribution to TLS 1.3 only without breaking clients?
A modern browser may use post-quantum TLS. An older device, API client, or corporate proxy may still require TLS 1.2. A distribution policy cannot tell the difference before the change. The new viewer headers can.
The reason to care is often called harvest now, decrypt later. An attacker can record encrypted traffic today and try to decrypt it later with a quantum computer. Data that must remain private for many years is the main concern.
The probe does not change CloudFront security by itself. It provides the data needed before changing the security policy.
What I built
The probe uses a dedicated
/pqc-probe behavior in CloudFront.- Normal site traffic uses the default behavior and stays cached.
- Requests to
/pqc-probeare not cached.
- An origin request policy forwards the new viewer headers.
- CloudFront sends signed requests to a Lambda Function URL.
- Lambda records the TLS and ISP values in CloudWatch Logs.
- CloudWatch Logs Insights groups the results by protocol, key exchange, and ISP.

Figure 1. CloudFront post-quantum readiness probe architecture.
The request flow is:
- A viewer sends an HTTPS request to
/pqc-probe.
- CloudFront terminates the viewer TLS connection.
- CloudFront adds the selected viewer headers.
- Origin access control signs the request to Lambda.
- Lambda writes a structured log record to CloudWatch Logs.
Architecture decisions
Decision | Alternative | Why I chose it |
|---|---|---|
Dedicated /pqc-probe* behavior | Disable caching for the whole distribution | Normal traffic stays cached. Only the probe reaches Lambda. |
Origin request policy | Cache policy | The ISP header is only supported in an origin request policy. The headers also stay out of the cache key. |
Header whitelist | AllViewer | A whitelist forwards only the three headers this probe needs. It also avoids forwarding the Host header to the Lambda Function URL. |
Lambda Function URL | EC2 or ALB | The probe only reads headers and writes a log line. Lambda avoids server management. |
OAC with AWS_IAM | Public Function URL | The Function URL accepts requests only from this CloudFront distribution. |
CloudWatch Logs Insights | Athena and S3 | Logs Insights is enough for a small readiness check. It needs no extra storage or tables. |
Short log retention | Keep logs forever | The probe stores only TLS, ISP, and a shortened user agent. Seven days is enough for the test. |
Prerequisites
You need:
- An AWS account with CloudFormation, CloudFront, Lambda, IAM, and CloudWatch Logs permissions.
- AWS CLI v2.
- CloudShell or Linux with a recent
curland OpenSSL.
- A second network, such as a phone hotspot, if you want to compare ISP values.
The project files are:
cloudfront-pqc-readiness-probe/├── template.yaml├── scripts/test-clients.sh└── README.mdStep 1: Create the CloudFront behavior
The default behavior represents normal site traffic. It uses AWS managed
CachingOptimized .The
/pqc-probe* behavior uses AWS managed CachingDisabled . Every probe request reaches Lambda, so every test creates a log line.DefaultCacheBehavior: TargetOriginId: probe-origin ViewerProtocolPolicy: redirect-to-https CachePolicyId: 658327ea-f89d-4fab-a63d-7e88639e58f6 # CachingOptimized
CacheBehaviors: - PathPattern: /pqc-probe* TargetOriginId: probe-origin ViewerProtocolPolicy: redirect-to-https CachePolicyId: 4135ea2d-6df8-44a3-9df3-4b5a84be39ad # CachingDisabled OriginRequestPolicyId: !Ref ViewerHeaderPolicy
Figure 2. The distribution has a dedicated/pqc-probe*behavior and a normal default behavior.

Figure 3. The probe behavior uses CachingDisabled and the custom origin request policy.
The behavior exists for the probe only. Do not disable caching for normal site content just to collect TLS data.
Step 2: Forward the new viewer headers
CloudFront does not forward the new values until they are added to an origin request policy.
ViewerHeaderPolicy: Type: AWS::CloudFront::OriginRequestPolicy Properties: OriginRequestPolicyConfig: Name: !Sub ${AWS::StackName}-viewer-tls-isp CookiesConfig: CookieBehavior: none QueryStringsConfig: QueryStringBehavior: none HeadersConfig: HeaderBehavior: whitelist Headers: - CloudFront-Viewer-TLS-Details - CloudFront-Viewer-ISP - User-Agent
Figure 4. The origin request policy forwards the TLS Details, ISP, and User-Agent headers.
I forward
User-Agent too. It helps identify a client that still uses TLS 1.2 or a classical key exchange.The two CloudFront headers are not included in the cache key. This is important. A cache key that varies by ISP or TLS setting would reduce cache efficiency.
Step 3: Protect the Lambda Function URL
A public Function URL would work for a test. I used origin access control (OAC) instead.
OAC signs every CloudFront request with SigV4. The Function URL uses
AWS_IAM , so direct requests to the Lambda URL are blocked.ProbeFunctionUrl: Type: AWS::Lambda::Url Properties: TargetFunctionArn: !GetAtt ProbeFunction.Arn AuthType: AWS_IAM
ProbeOac: Type: AWS::CloudFront::OriginAccessControl Properties: OriginAccessControlConfig: Name: !Sub ${AWS::StackName}-lambda-oac OriginAccessControlOriginType: lambda SigningBehavior: always SigningProtocol: sigv4
Figure 5. CloudFront uses the configured origin access control.

Figure 6. The Lambda Function URL uses AWS_IAM authentication.
CloudFront needs two Lambda permissions. Both permissions are limited to the distribution ARN.
CloudFrontInvokeFunctionUrl: Type: AWS::Lambda::Permission Properties: FunctionName: !Ref ProbeFunction Action: lambda:InvokeFunctionUrl Principal: cloudfront.amazonaws.com SourceArn: !Sub arn:aws:cloudfront::${AWS::AccountId}:distribution/${Distribution}
CloudFrontInvokeFunction: Type: AWS::Lambda::Permission Properties: FunctionName: !Ref ProbeFunction Action: lambda:InvokeFunction Principal: cloudfront.amazonaws.com SourceArn: !Sub arn:aws:cloudfront::${AWS::AccountId}:distribution/${Distribution}Step 4: Log only the fields needed
The Lambda function reads the lower-case request header names used by Function URL events. It parses the TLS Details JSON, marks ML-KEM connections as PQC, and prints one JSON record.
import json
def handler(event, context): path = event.get("rawPath", "/") headers = event.get("headers") or {}
if not path.startswith("/pqc-probe"): return { "statusCode": 200, "headers": {"cache-control": "max-age=300"}, "body": "site content\n", }
try: tls = json.loads(headers.get("cloudfront-viewer-tls-details", "{}")) except ValueError: tls = {}
key_exchange = tls.get("keyExchange", "") record = { "probe": "pqc", "isp": headers.get("cloudfront-viewer-isp", "unknown"), "tlsVersion": tls.get("tlsVersion", ""), "handshakeType": tls.get("handshakeType", ""), "keyExchange": key_exchange, "pqc": "mlkem" in key_exchange.lower(), "userAgent": headers.get("user-agent", "")[:120], } print(json.dumps(record))
return { "statusCode": 200, "headers": {"content-type": "application/json", "cache-control": "no-store"}, "body": json.dumps(record) + "\n", }The function handles two normal cases:
- CloudFront can omit the ISP header when it cannot determine the ISP.
- A malformed or missing TLS Details header should not break the probe.
Step 5: Deploy the stack
Deploy the template from CloudShell or a local terminal.
aws cloudformation deploy \ --template-file template.yaml \ --stack-name cf-pqc-probe \ --capabilities CAPABILITY_IAMCloudFront takes several minutes to deploy. When the stack status becomes
CREATE_COMPLETE , copy the ProbeUrl from the Outputs tab.
Figure 7. The CloudFormation stack completed successfully.

Figure 8. The stack outputs provide the CloudFront domain, probe URL, and log group.
Step 6: Test a browser connection
I opened the probe URL from Chrome on a phone hotspot.
https://d6ioinza0w03d.cloudfront.net/pqc-probeThe result showed TLS 1.3,
X25519MLKEM768 , and pqc: true . The ISP value was Indosat .
Figure 9. Chrome on an Indosat mobile connection negotiated X25519MLKEM768.
I then moved the laptop to a Biznet Networks Wi-Fi connection. Chrome again used TLS 1.3 with
X25519MLKEM768 .

Figure 10. Chrome on Biznet Networks also negotiated X25519MLKEM768.
These two browser tests do not prove that every Indosat or Biznet customer uses PQC. They show only the TLS connection from my test browser at that moment.
Step 7: Test different client TLS settings
I ran the remaining tests from AWS CloudShell. CloudShell used curl 8.21.0 with OpenSSL 3.5.8.
The default curl connection used TLS 1.3 but negotiated classical
x25519 . The probe returned pqc: false .
Figure 11. CloudShell default curl used TLS 1.3 with classical x25519.
Next, I forced three connection types.
DOMAIN=d6ioinza0w03d.cloudfront.net
curl -s --curves X25519MLKEM768 https://$DOMAIN/pqc-probecurl -s --curves X25519 https://$DOMAIN/pqc-probecurl -s --tls-max 1.2 https://$DOMAIN/pqc-probe
Figure 12. One CloudFront distribution produced PQC, classical TLS 1.3, and TLS 1.2 results based on client settings.
Test | TLS version | Key exchange | PQC |
|---|---|---|---|
Forced ML-KEM | TLSv1.3 | X25519MLKEM768 | true |
Forced classical curve | TLSv1.3 | x25519 | false |
TLS 1.2 maximum | TLSv1.2 | x25519 | false |
This is the main result of the probe. CloudFront supports post-quantum TLS, but the viewer chooses whether it is used.
Step 8: Test TLS session resumption
A resumed TLS 1.2 session behaves differently. The first connection reports its negotiated key exchange. The resumed connection returns
NONE for keyExchange .printf 'GET /pqc-probe HTTP/1.1\r\nHost: %s\r\nConnection: close\r\n\r\n' "$DOMAIN" > req.txt
openssl s_client -quiet -tls1_2 \ -connect $DOMAIN:443 -servername $DOMAIN \ -sess_out sess.pem < req.txt
openssl s_client -quiet -tls1_2 \ -connect $DOMAIN:443 -servername $DOMAIN \ -sess_in sess.pem < req.txt
Figure 13. The resumed TLS 1.2 connection reportssessionResumedandkeyExchange: NONE.
This is expected. For resumed TLS 1.2 sessions, AWS documents that
keyExchange , signatureScheme , and signaturePublicKeyType become NONE .Do not count
NONE as a classical key exchange. Treat it as a resumed session with no new key exchange value.For resumed TLS 1.3 sessions, the key exchange value is still available because TLS 1.3 performs a new key exchange during resumption.
Step 9: Confirm normal site traffic stays cached
The probe path must be uncached, but normal traffic should stay cached.
for i in 1 2; do echo "== Request $i ==" curl -s -o /dev/null -D - https://$DOMAIN/ | grep -i -E '^(HTTP|x-cache)'done
Figure 14. The normal path returned a cache Miss, then a cache Hit.
This is why I used a dedicated probe path. The measurement does not require disabling cache for every normal request.
Step 10: Read the logs
The Lambda function writes the values as structured JSON. The raw log entries showed both browser ISPs and the TLS Details values forwarded by CloudFront.

Figure 15. CloudWatch Logs contains the ISP, TLS version, handshake type, key exchange, and PQC result.
The template creates this Logs Insights query:
filter probe = "pqc"| stats count(*) as connections by tlsVersion, keyExchange, pqc| sort connections desc
Figure 16. The protocol query found four connection groups from 19 test connections.
The result was:
TLS version | Key exchange | PQC | Connections |
|---|---|---|---|
TLSv1.3 | X25519MLKEM768 | true | 14 |
TLSv1.2 | x25519 | false | 2 |
TLSv1.3 | x25519 | false | 2 |
TLSv1.2 | NONE | false | 1 |
The
NONE row comes from the resumed TLS 1.2 test. It should not be used as evidence of a classical key exchange.The ISP query is:
filter probe = "pqc"| stats count(*) as connections by isp, tlsVersion, pqc| sort connections desc
Figure 17. The ISP query separates browser and CloudShell test traffic.
ISP | TLS result | Connections |
|---|---|---|
Indosat | TLS 1.3, PQC | 10 |
Biznet Networks | TLS 1.3, PQC | 3 |
Amazon.com | TLS 1.2, no PQC | 3 |
Amazon.com | TLS 1.3, classical | 2 |
Amazon.com | TLS 1.3, PQC | 1 |
The dataset is small and comes only from my test networks. It is not an ISP-wide adoption report. The useful point is that the same distribution observed different TLS behavior from different clients and networks.
What I hit during testing
The first surprise was CloudShell. It used OpenSSL 3.5.8, which supports the post-quantum group used in this test. However, default curl still negotiated classical
x25519 and returned pqc: false .I had to force
X25519MLKEM768 with --curves X25519MLKEM768 before curl negotiated post-quantum TLS. This is a useful reminder that server support does not mean client adoption.The second behavior was TLS 1.2 session resumption. The resumed connection returned
keyExchange: NONE . At first, this could look like a failed log field. AWS documents this as expected behavior for resumed TLS 1.2 sessions.The third point was Lambda Function URL access. CloudFront showed CLI permission commands in the console. I did not run them manually because the CloudFormation template already created the two required permissions. Adding duplicate permissions would fail.
How to use this result
The probe supports three decisions:
Result | Meaning | Next step |
|---|---|---|
TLS 1.3 with an ML-KEM group | The connection already uses post-quantum key exchange. | No client change is needed. |
TLS 1.3 with a classical group | The client supports TLS 1.3 but does not offer ML-KEM. | Update the client or its TLS library. CloudFront cannot force this choice. |
TLS 1.2 | The client would fail under a TLS 1.3 only policy. | Identify the client by User-Agent and contact the owner before changing policy. |
No TLS 1.2 during an observation period | No observed client depends on TLS 1.2. | Consider testing TLSv1.3_2025 on a staging distribution first. |
For an existing production distribution, add the probe as one extra behavior and sample a small share of page views. For example, a page can call
fetch('/pqc-probe', { cache: 'no-store' }) for one to five percent of users.API clients and devices will not run a browser script. Ask their owners to call the probe URL, or add the header forwarding to a matching API behavior.
Cost and cleanup
AWS does not charge extra for CloudFront post-quantum key exchange or the
TLSv1.3_2025 policy.This test used CloudFront requests, a Lambda function with 128 MB memory, and CloudWatch Logs with seven-day retention. A few hundred probe requests should cost well below one US dollar. In production, the sampling rate is the main cost control.
Delete the test stack when finished:
aws cloudformation delete-stack --stack-name cf-pqc-probeaws cloudformation wait stack-delete-complete --stack-name cf-pqc-probeConclusion
CloudFront-Viewer-TLS-Details turns post-quantum readiness from an assumption into a measurement. It shows whether a viewer uses post-quantum TLS, classical TLS, or TLS 1.2.CloudFront-Viewer-ISP adds network context. It helps connect unexpected TLS behavior to a viewer network.With a dedicated uncached probe path, an origin request policy, OAC, Lambda logging, and Logs Insights, the probe runs beside normal cached traffic. The result supports a real decision: whether a CloudFront distribution is ready for a TLS 1.3 only policy.
References
- AWS. Add CloudFront request headers . Amazon CloudFront Developer Guide.
- AWS. Supported protocols and ciphers between viewers and CloudFront . Amazon CloudFront Developer Guide.
- AWS. Restrict access to an AWS Lambda function URL origin . Amazon CloudFront Developer Guide.
- AWS. Use managed cache policies . Amazon CloudFront Developer Guide.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article