aws-samples / amazon-cloudfront-access-logs-queries

Analyze your Amazon CloudFront Access Logs at Scale with Amazon Athena.
MIT No Attribution
111 stars 70 forks source link

support hostheader as a partition to allow multiple sites to be handled by 1 bucket/stack #8

Closed leecookson closed 4 years ago

leecookson commented 4 years ago

Since the host header isn't in the log file name, it would need to be part of the log bucket's prefix configured in CloudFront to keep the lambda stateless when converting new log objects to the partition format.

We have lots of sites, and would like to avoid the overhead of setting up a new stack for each one, and also have the flexibility to query multiple sites at once while still maintaining the cost/performance benefits of using partitions.

steffeng commented 4 years ago

How many hostnames do you have, 10/100/10000s...? How many Amazon CloudFront distributions do you have? Querying for the x-host-header in the logs does not do the trick?