Search code examples
amazon-web-servicesamazon-cloudfront

Aws cloudfront - is it possible to make analytic for the traffic


Cloudfront is a CDN, so some of the requests from client are retrieved from cache.

I wonder if there is any method to count the traffic for Cloudfront by below criteria.

1.Record how many people access the website(in a day/week/month)?
2.Record the activity of using certain route(e.g. user Tim use POST /login in 2020-01-29 19:00)


Solution

  • CloudFront (CF) privides a rich portfolio of monitoring methods, some of them are:

    By going through these logs, I'm sure you can get the information you are after. It may be not so obvious at the beginning, but the log data should contain all its needed for that.

    Record how many people access the website(in a day/week/month)?

    This I think you could check using Requests metric in CloudFront distribution metrics in CloudWatch.

    Record the activity of using certain route

    This is more application specific. If there is no out-of-the box method for that, you could parse access logs to got such information.