- 最新
- 最多得票
- 最多評論
CloudFront access logs are stored in Amazon S3 and can be used to see the requests for your CloudFront distributions for the last six months. Here are the steps you can take to access the logs for the last 6 months:
In the AWS Management Console, navigate to the CloudFront service. In the left-hand navigation, click on "Distributions". Select the distribution for which you want to view the logs. In the General tab, under the "Logs" section, click on the "Enable" button. A dialog box will appear asking you to specify an S3 bucket to store the logs. If you don't have an existing S3 bucket, you can create a new one. Once you have specified the S3 bucket, click on "Create" to enable logging. Once logging is enabled, CloudFront will start logging all requests to the specified S3 bucket. The logs will be stored in a directory structure in the S3 bucket, with the top-level directory being the distribution ID, and subdirectories for each day. The logs will contain information such as the request time, the IP address of the client, the request URI, and the HTTP status code.
You can use the S3 bucket's access logs to see the requests for your CloudFront distributions for the last 6 months. You can also use Amazon Athena, Amazon QuickSight, or AWS Glue to analyze the logs.
Please note that, CloudFront logs are delivered to your S3 bucket every 12 hours, so you might not see the latest access logs immediately.
Also, there's a retention period for the logs on the S3 bucket, make sure the logs are still available within that retention period.
Hi Ahmad,
Thank you for the reply! After implementing the configuration you have mentioned we will start getting the logs for Cloudfront distribution in the next 12 hours. But as mentioned in the description we are concerned about logs for the past 6 months which are from July 2022 to December 2022, How can we access those logs?