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

Query: Top 10 URIs (Errors)

Description

List the top 10 requested URIs by error count.

Usage

powerpipe query aws_s3_server_access_log_detections.query.activity_dashboard_top_10_error_uris

SQL

select
bucket || split_part(request_uri, ' ', 2) as "URI",
count(*) as "Error Count",
string_agg(distinct http_status::text, ', ' order by http_status::text) as "Status Codes"
from
aws_s3_server_access_log
where
http_status between 400 and 599
group by
"URI"
order by
count(*) desc,
"URI"
limit 10;

Dashboards

The query is used in the dashboards: