Reputation: 41
I have a list of AWS Cloudfront distributions and some of them use a default certificate. I want to disable these distributions, but first i want to make sure that these distributions are not in use. I would like to accomplish it with API/SDK, how can i do that ? Is there a standard way to verify that the distribution is not accessed at all ? I was thinking of some how to use the cloudFront logging capability, but it provides logs with irrelevant data. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/logging.html
is there a simple way to do it ? say a query to AWS that tell me how many requests were made to a specific distribution in a given time interval.
Upvotes: 1
Views: 211
Reputation: 213
If you have logs enabled you can query Athena by hosts or distribution id to find out how many requests are made to particular distribution https://docs.aws.amazon.com/athena/latest/ug/cloudfront-logs.html
Or you can look at the monitoring section of the Cloudfront where it shows number of requests by going to Monitoring section of cloudfront in Admin console. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/monitoring-using-cloudwatch.html
Upvotes: 1