Reporting Amazon CloudFront traffic by a specific url path in one distribution

0

Customer asked if there is a way to now the number of requests in a certain path in a distribution

1 Answer
0

I would use Athena to query the access logs which should be situated within an S3 bucket using a count function.

cs-uri-stem

The portion of the request URL that identifies the path and object (for example, /images/cat.jpg). Question marks (?) in URLs and query strings are not included in the log.

SELECT COUNT(cs-uri-stem)
FROM table_name
WHERE "cs-uri-stem"='/example.jpg';

https://docs.aws.amazon.com/athena/latest/ug/cloudfront-logs.html

profile picture
EXPERT
answered 4 months 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