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
已提问 4 年前283 查看次数
1 回答
0
已接受的回答

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
已回答 4 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则