latest run 54 pass 0 fail 0 skipevidence →
HKB Operations: pages
HKB OperationsKnowledge space

Starred pages

Pages

Page directory · Labels · [ hides this

Site access logs

CloudFront access logs for the Prod site, delivered to Log Archive so the account that serves the site doesn't hold its own record of who visited.

Flow

Site access logs flowA visitor requests the site from CloudFront in the Prod account. CloudFront standard logging v2 delivers each request's log, 12 fields and no cookies, through vended delivery to a delivery destination in the Log Archive account, which writes it to a bucket under its own KMS key, kept 30 days. Once a day, EventBridge Scheduler starts the hkb-site-traffic CodeBuild job in Prod. It reads the logs across accounts and writes totals, never addresses, to the site bucket, which CloudFront serves.AWS CloudProd · hkb-prodLog Archive · hkb-log-archiveVisitorbrowserCloudFronthirekylebuhrmann.comSite bucketpages and totalsSchedulerdaily, 01:30 UTCTraffic jobhkb-site-trafficDelivery destinationonly Prod may deliverAccess logs bucketexpires at 30 daysKMS keythe bucket's ownAddresses stay in Log Archive and the job: the site publishes totals only.The bucket policy denies deletes before expiry.Legend1Request or run orderRequest / dataEvent / logAttached / governsBlueOpens its pagerequests1standard logging v2212 fields, JSONstarts3reads, across accounts4totals only5servesencrypts
Site access logs flowOpen full sizeClose

Logs leave Prod for Log Archive as they are written. The daily job reads them back and publishes totals only.

Configuration

SettingValue
DeliveryCloudFront standard logging (v2) from Prod, through CloudWatch Logs vended delivery to a delivery destination in Log Archive. The destination's policy lets only Prod create a delivery to it
FormatJSON, 12 fields, no cookies
EncryptionSSE-KMS under the bucket's own key; ACLs off
RetentionExpiry at 30 days; a bucket policy denies deletes before then
ReadersHKB-ReadOnly in Log Archive, and the daily traffic job in Prod, hkb-site-traffic, across accounts. The job publishes totals only; addresses are never published

Fields

date, time, x-edge-location, sc-status, cs-method, cs-uri-stem, cs(Referer), cs(User-Agent), c-ip, x-edge-result-type, time-taken, sc-bytes.

Sources

  • Templates and scripts: security/hkb-log-archive-site-logs.yaml, workloads/hkb-site.yaml
  • Decisions: DQ-132, DQ-134, DQ-250

Page information

Owner
Platform Engineering
Status
current Current: generated from the templates and records in the repository at this build.
Generated from
org/hkb-org-landing-zone.yaml, security, workloads/hkb-site.yaml
Linked from
Log Archive, Traffic job