Cloudfront monitoring metric & reports

Taegu KangTaegu Kang
2 min read
  • outline

Monitor and metrics for CloudFront

  • CloudWatch metric (max 15 months)

DistributionID
FriendlyName
TimeBucket
Requests
BytesDownloaded
BytesUploaded
TotalErrorRatePct
4xxErrorRatePct
5xxErrorRatePct
Cache hit rate
Origin latency
Error rate by status code

  • CloudWatch metric

You can check it on CloudWatch dashboard

  • CloudFront report ( Up to 15 days from 30 minutes ago)

CloudFront cache statistics reports
\>> Hits, Misses, Errors, Status Code, Requests, Total bytes, Bytes from misses
CloudFront popular objects report
CloudFront top referrers report
CloudFront usage reports
\>> HTTP, HTTPS, From CloudFront to your users, From CloudFront to your origin
CloudFront viewers reports Device, Browsers, Opreating systems, Locations

  • CloudFront report

Dashboard using csv parsing

  • Cloudfront logging ( standard logs access logs )

Unlimit from several hours ago

  • Cloudfront logging ( standard logs access logs )

s3 bucket logging
cf -> s3 -> athena -> quicksight

  • Cloudfront logging ( real-time logs )

As long as you want from several seconds ago

  • Cloudfront logging ( real-time logs )

Kinesis data stream
cf -> kinesis data stream -> kinesis data firehose -> opensearch -> kibana

  • Server Timing headers

cdn-cache-hit
cdn-cache-refresh
cdn-cache-miss
cdn-pop
cdn-rid
cdn-hit-layer
\> EDGE
\> REC
\> Origin Shield
cdn-upstream-layer
\> EDGE
\> REC
\> Origin Shield
cdn-upstream-dns
cdn-upstream-connect
cdn-upstream-fbl
cdn-downstream-fbl

  • reference

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/viewing-cloudfront-metrics.html
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudwatch-csv.html
https://docs.aws.amazon.com/ko_kr/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html
https://docs.aws.amazon.com/ko_kr/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.htmlhttps://aws.amazon.com/ko/blogs/korea/cloudfront-realtime-logs/
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/understanding-response-headers-policies.html#server-timing-header?
https://aws.amazon.com/blogs/networking-and-content-delivery/amazon-cloudfront-introduces-server-timing-headers/

0
Subscribe to my newsletter

Read articles from Taegu Kang directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Taegu Kang
Taegu Kang