The solution uses Athena to query CloudFront logs, if this is the first time you use Athena in the region, you are required to specify the location for query results in Athena, or else you can skip this section.
Before you can run a query, a query result bucket location in Amazon S3 must be specified.
To specify a client-side setting query result location using the Athena console
Open Athena console.
From the navigation bar, choose Settings.
From the navigation bar, choose Manage.
In the Location of query result box, choose Browse S3, choose a S3 bucket in us-east-1 to store the query result, and then click Choose.
Choose Save.