save logs of each outbound data transfer response from cloudfront to s3

0

I need to do this to charge my clients for data usage, so for each request I would need to get the request header with the output data transfer response and save it to s3

Caymmi
已提问 2 年前329 查看次数
1 回答
0

Hi there. I provided some options in your other question, but now I think I understand your request better.

My first question is would be is it possible to have your clients traffic on different distributions? If so, the built-in usage report might give you what you need.

If not, then I would recommend option 2 that I specified in my other answer, sending log data to AWS OpenSearch. This would allow you to use tools like Kibana to parse the logs and create custom dashboards. You can use the sc-bytes field to get the data transferred, and then correlate with other fields like cs-host (if filtering by host) or cs-uri-step (if filtering by URI), etc. More info on fields available here.

Here is a good blog post that gives an overview of how to set this up. Just keep in mind that the ElasticSearch service was recently renamed to AWS OpenSearch in 2021, but the blog post is still relevant.

Another option that you could look into is sending the standard CloudFront logs to CloudWatch. I have not used this option as much, so I don't know if it will get you exactly what you need, but it might be worth investigating. Here is another blog post that might help.

profile pictureAWS
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则