- Newest
- Most votes
- Most comments
Based on the information available, your suspicion about CloudFront counting WebSocket Secure (WSS) traffic as HTTPS in usage reports is incorrect. CloudFront actually counts HTTPS WebSocket requests, including WSS traffic, under the HTTPS category in usage reports.
Specifically, CloudFront includes HTTPS WebSocket requests (GET requests with the 'Upgrade: websocket' header) in the count of HTTPS requests that are forwarded to your origin or edge function. This is categorized under the 'Requests-HTTPS-Proxy' usage type in CloudFront's billing and usage reports.
Given that your entire CloudFront setup is configured to use HTTPS only, the HTTP traffic you're seeing in the usage reports is likely not related to WSS traffic. There could be other reasons for this discrepancy:
-
It's possible that some clients are still attempting HTTP connections, which are then being redirected to HTTPS. These initial HTTP requests would still be counted in the usage reports.
-
There might be some configuration issues allowing HTTP traffic through, despite your intention to use HTTPS only.
-
The traffic pattern matching between HTTP traffic in CloudFront stats and WebSocket traffic on your origin server could be coincidental.
To resolve this issue and understand the source of the HTTP traffic, you should:
-
Double-check your CloudFront distribution settings to ensure that the Viewer Protocol Policy is set to 'Redirect HTTP to HTTPS' or 'HTTPS Only' for all cache behaviors.
-
Verify that your origin server is not accepting HTTP connections.
-
Use CloudFront access logs or real-time logs to analyze the specific requests causing the HTTP traffic in your usage reports.
-
Consider reaching out to AWS Support for a more detailed analysis of your specific setup and traffic patterns.
Remember, CloudFront is designed to accurately report HTTPS and WSS traffic under the HTTPS category, so the issue you're experiencing is likely not due to misclassification of WSS traffic as HTTP.
Sources
Interpret your AWS bill and usage reports for CloudFront - Amazon CloudFront
Viewer HTTPS configuration - Secure Content Delivery with Amazon CloudFront
Relevant content
- asked 3 months ago
- asked 3 months ago
- asked a year ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 9 months ago