1

As mentioned on this documentation page

Important

We recommend that you use the logs to understand the nature of the requests for your content, not as a complete accounting of all requests. CloudFront delivers access logs on a best-effort basis. The log record for a particular request might be delivered long after the request was actually processed, or not at all. In rare cases, usage that appears in the AWS usage tracking and billing systems might not appear in CloudFront access logs.

I am building a system where I have to bill/limit my clients according to the amount of data used by them. If not the logs, what are other fine-grained access monitoring I can use to measure the bandwidth usage based on objects.

cnvzmxcvmcx
  • 113
  • 4

2 Answers2

2

Note where it says "In rare cases..."

It isn't that the Cloudfront access logs aren't reliable, it's just that with Cloudfront, the logs are not guaranteed to absolutely, completely, precisely, and perfectly account for each and every last request that may have been processed, nor is there a guarantee that Cloudfront will never find old, stranded log records and deliver them to you later.

S3 logging has a similar disclaimer:

The completeness and timeliness of server logging, however, is not guaranteed. The log record for a particular request might be delivered long after the request was actually processed, or it might not be delivered at all. The purpose of server logs is to give you an idea of the nature of traffic against your bucket. It is not meant to be a complete accounting of all requests. It is rare to lose log records, but server logging is not meant to be a complete accounting of all requests.

http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerLogs.html

The wording, in both cases, is not likely to be anything more significant than a simple disclaimer that AWS can refer to if a client attempts to dispute their charges based on the logs that were collected, particularly where the discrepancy between billing and logs is relatively minor.

In my experience, logs containing requests that were significantly in the past have occurred, but they are unusual, and when I have gone to look for the details of specific requests in the Cloudfront logs, they have been there.

Collect the Cloudfront logs and compare them to your detailed billing. If there is no significant inconsistency, then I would suggest that there is no need for significant concern over the implications of this disclaimer.

Michael - sqlbot
  • 22,658
  • 2
  • 63
  • 86
2

There is no cost to creating additional CloudFront distributions, so I would recommend creating at least one distribution per-client. Combined with the AWS usage report, one distribution per client would allow you to see fairly detailed information. The usage report is different from the access logs. Review the documentation:

Specifically, the Resource column will match your CloudFront Distribution ID.

dialt0ne
  • 3,065
  • 20
  • 27