Every small business owner with a website asks the same question sooner or later: is anybody looking at it? The usual answer is an analytics tag. A script on every page reports each visit to a third party, and in return you get a dashboard.

I did not want that on my own site. The footer says "No forms, no trackers," and I meant it. But I still wanted the answer. So I asked a narrower question: what can I learn from the logs the CDN can already keep, without adding anything to the pages?

Where the data comes from

The site is static files in S3 behind CloudFront. CloudFront can write a line for every request it serves. The newer form of this, standard logging v2, sends the logs through a delivery service to an S3 bucket as gzipped JSON lines, one object per batch, filed under a date path:

s3://example-cf-logs/AWSLogs/<account>/CloudFront/www/2026/11/17/

Turning it on is three calls: a delivery source for the distribution, a delivery destination that points at the bucket with JSON output, and a delivery that joins them with that date suffix. It never touches the distribution's own configuration, so there is no redeploy and nothing to roll back.

My infrastructure tool creates the bucket first if it does not exist, and creates it the same way every time:

  • All public access blocked.
  • Encrypted at rest.
  • A lifecycle rule that deletes every object after 90 days.
  • A bucket policy that lets only the log delivery service write, and only for my own account.

Two small traps cost me time. The CLI's shorthand syntax cannot take the {yyyy}/{MM}/{dd} braces in the path, so the call has to use the JSON parameter form. And AWS quietly puts AWSLogs/<account>/CloudFront/ in front of whatever suffix you give it, so the report has to look under that prefix.

The script

The report is one Python file of about 300 lines. For a window of N days it builds the list of day prefixes, lists every object under them, decompresses each one and reads it line by line. Each record is folded into a few counters:

  • Total requests and bytes served.
  • Distinct client IP addresses, overall and for browser traffic.
  • Requests per day.
  • Top pages, counting browser requests only and skipping stylesheets, scripts, images and fonts.
  • Top referrers from outside the site.
  • Status codes.
  • The most common automated user agents.

Separating people from machines is the hard part, and I kept it simple. A request counts as automated if its user agent is empty or contains any of a list of markers:

BOT_MARKERS = (
    "bot", "crawl", "spider", "slurp", "curl", "wget", "python",
    "go-http", "java/", "libwww", "headless", "scan", "monitor",
    "probe", "fetch", "http-client", "httpclient", "zgrab", "censys",
    "expanse", "facebookexternalhit", "preview", "validator",
)

def is_bot(user_agent: str) -> bool:
    if not user_agent or user_agent == "-":
        return True
    ua = user_agent.lower()
    return any(marker in ua for marker in BOT_MARKERS)

Everything else is treated as a person. The script only reads from S3. It changes nothing, and it prints a plain text report to the terminal.

One real month

I ran it for the last 30 days, October 20 through November 18. It read 1,805 log objects and took about two minutes. These are the totals:

MeasureCount
Requests44,243
Data served237.3 MB
Browser-like requests27,331 (62%)
Automated requests16,912
Distinct IP addresses1,553
Distinct IP addresses with a browser-like agent1,041
Busiest day5,111 requests
Quietest full day564 requests

The status codes tell a different story from the totals:

StatusRequests
404 Not Found31,824
301 Moved Permanently9,018
200 OK3,282
Everything else119

Seventy-two percent of all requests asked for something that does not exist. Fewer than one in ten got a page.

The mistake the numbers showed me

The top pages list should have been the most useful part. The home page was first, with 2,917 browser requests, and the local business page second with 195. Then came this:

  • /.env, 152 requests
  • /.git/config, 116
  • /.env.production, 104
  • /.env.local, 101
  • /.aws/credentials, 94

No person types those. They are scanners looking for secrets that a careless server might hand out, and a static site has none of those files. The scanners send a browser's user agent, so my filter counted them as people.

That means 62% is a ceiling for human traffic, not an estimate. The same goes for the 1,041 browser-like addresses. One address is also not one person: a household or an office shares one, and a phone changes addresses as it moves. Treat the visitor count as rough.

The referrers had the same problem. Google sent 191. Another 103 claimed to come from a cryptocurrency exchange, and a handful came through redirect pages built to plant links in reports like this one. The referrer is whatever the client chooses to send.

The fix I would make next is to drop any path the site does not serve before it reaches the page and referrer counts. On a static site that is an easy test: if the answer was a 404, it was not a visit.

The note

A business owner does not want the report. They want a paragraph. I write it from the report each month, and for this month it reads:

In the 30 days to November 18 the site answered about 44,000 requests from about 1,550 addresses. Most of that was automated: scripts looking for files the site does not have. The home page was requested about 2,900 times by browsers and the local business page about 200 times. Google sent about 190 visits. There was one server error all month.

That is honest, and it is enough to act on. It says the site is up, search is sending a small number of people, and the second page is getting seen.

The privacy trade-off

Access logs are not anonymous. Each line holds the visitor's IP address and user agent. It stays in my own AWS account, but it is not nothing.

Before I turned logging on, the site said nothing about a visit was stored. Once the logs existed that was no longer true, so I changed it. The footer now says server logs are kept 90 days, and the bucket's lifecycle rule is what makes the 90 days true.

If you want the same thing

  • Turn on CloudFront standard logging v2 to a private, encrypted bucket with an expiry rule. Pick the number of days before you start.
  • Say on the site that logs are kept, and for how long.
  • Count distinct addresses, not visitors, and call it approximate.
  • Filter bots by user agent, then also drop requests for paths you do not serve.
  • Read the status codes first. They tell you how much of the traffic was real.
  • Write the monthly note in four or five sentences, in the owner's words.