AWS CloudFront Logs - Cost-Effective Solution for Real-Time Analysis

How to Capture Amazon CloudFront Logs in Seconds on a Limited Budget

Question

A global media firm is using Amazon CloudFront to deliver content stored in the Amazon S3 bucket.

The Operations Team needs to have Amazon CloudFront logs in seconds to analyze requests made to the CloudFront distribution.

Limited Budget is assigned to this project & needs to have a cost-effective solution for capturing these logs. What can be configured to meet this requirement?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: B.

Amazon CloudFront provides two types of logs.

Standard Logs:Delivers detailed records of the request made to the distribution to Amazon S3 bucket & logs are not chargeable.

Real-Time Logs: Delivers logs of the specific fields chosen by the user in seconds using Amazon Kinesis Data Streams & are chargeable.

With the Sampling rate, the percentage of the requests for which real-time logs will be received can be controlled.

In the above case, to reduce cost, clients can configure the sampling rate as 50% to get logs in seconds only for 50% of the requests.

Options A & D are incorrect as with standard logs, logs are not delivered in seconds.

Option C is incorrect as with the sampling rate at 100, all requests will be delivered in seconds which will incur additional costs for logs.

For more information on Amazon CloudFront Logs, refer to the following URLs,

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/logging.html https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html

To capture the logs for Amazon CloudFront, you can configure either standard logs or real-time logs. Standard logs are delivered periodically, while real-time logs are delivered immediately after each viewer request.

In this scenario, the Operations Team requires the logs to be available in seconds to analyze the requests made to the CloudFront distribution. Therefore, real-time logs should be used.

To ensure a cost-effective solution, you can configure the sampling rate for the real-time logs. This means that only a percentage of requests will be logged, reducing the amount of data and storage required.

Option A and D suggest configuring the sampling rate for standard logs. Since the requirement is for real-time logs, these options are not relevant.

Option B suggests configuring the sampling rate for real-time logs as 50, meaning that only 50% of requests will be logged. This could reduce the amount of data and storage required but may not provide the desired level of detail for analysis.

Option C suggests configuring the sampling rate for real-time logs as 100, meaning that all requests will be logged. This would provide the desired level of detail for analysis, but would also generate a large amount of data and require more storage.

Therefore, the best option for this scenario would be to choose option C - configure the sampling rate for real-time logs as 100. While this would generate a large amount of data, it would provide the required level of detail for analysis and would be the most cost-effective solution for the Operations Team.