Create the Table

ALB log fields can expand, so avoid copying an old regex DDL unchanged. Adapt the official DDL below to the current log format and S3 path.

Application Sequence

  1. Check the ALB log S3 bucket, prefix, account, region, and date paths.
  2. Compare sample logs against the official DDL fields and regex.
  3. Configure query-result storage and read/write permissions.
  4. Configure date partitions or partition projection.
  5. Check parsed results and NULL rates over a small date range.

Requests by Status Code

The example below assumes a partitioned table whose day field uses yyyy/MM/dd.

SELECT elb_status_code, COUNT(*) AS requests
FROM alb_logs
WHERE day = '2026/10/06'
GROUP BY elb_status_code
ORDER BY requests DESC;

Adapt table names and dates to the actual environment. Limit scanned data with partition conditions, and distinguish ALB status codes from target status codes. Request URLs and IP addresses can contain sensitive information; check the sharing scope of results.

Powered by Fruition