Reporting Amazon CloudFront traffic by hostname in one distribution

0

Customer is using one Amazon CloudFront Distribution to deliver multiple hostname (CNAME). A challenge is - it became legacy and person in charge doesn't know whether some of CNAMEs are still used or not.

Is there visibility on traffic (bytes / requests) on host name (host header value)?

AWS
Julian
asked 4 years ago277 views
1 Answer
0
Accepted Answer

You can enable CloudFront Access Logs and analyse them (x-host-header), they can quickly do this with Athena. You can also have an idea by checking the Top Referers in CloudFront console, logs remain the most precise.

Sample request with Athena

SELECT hostheader as CNAME, count(hostheader) as NbRequests from nameoftable_cflogs WHERE (date BETWEEN date '2020-05-01' AND date '2020-06-14') GROUP BY hostheader
AWS
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions