turbot/tailpipe-mod-aws-s3-server-access-log-detections

Query: Requests by Status Code Category

Description

Count of requests grouped by HTTP status code category.

Usage

powerpipe query aws_s3_server_access_log_detections.query.activity_dashboard_requests_by_status_category

SQL

select
case
when http_status between 200 and 299 then '2xx Success'
when http_status between 300 and 399 then '3xx Redirect'
when http_status between 400 and 499 then '4xx Client Error'
when http_status between 500 and 599 then '5xx Server Error'
else 'Other'
end as "Status Category",
count(*) as "Request Count"
from
aws_s3_server_access_log
where
http_status is not null
group by
"Status Category"
order by
"Status Category";

Dashboards

The query is used in the dashboards: