Agent skill · aws
querying-aws-redshift
Enables Redshift system-table (SYS_*) log publishing to S3 Tables in Apache Iceberg format for both Provisioned clusters and Serverless namespaces, verifies publishing status, and queries the published logs via any Iceberg-compatible engine including Redshift and Athena. Covers system tables such as sys_query_history, sys_query_text, sys_connection_log, sys_query_detail, and sys_session_history. Applies when turning on S3 Tables log publishing for a cluster or namespace, confirming publishing status and locating the S3 Tables namespace, querying non-realtime data from Redshift system tables off-cluster at scale, or building dashboards for Redshift monitoring and auditing, especially for historical or high-volume system-table data beyond the in-cluster SYS_ view retention window. Trigger phrases: publish redshift system table log to s3 tables, enable-logging s3 tables, describe redshift logging status, query redshift system tables in athena or redshift, redshift log exports to iceberg.
What it needs
About 11k tokens when loaded.
What this skill does
Query AWS Redshift System Tables Overview Works best with the AWS MCP server for sandboxed execution and audit logging. All commands below use the AWS CLI and work in any environment with configured AWS credentials. Use IAM roles or temporary credentials; avoid long-lived access keys. Redshift can publish system tables — the SYS monitoring data such as sysqueryhistory, sysquerydetail, and sysconnectionlog — to S3 Tables as continuously-updated Apache Iceberg tables. Terminology used throughout: system table refers to a SYS dataset generally, and each one maps 1:1 to a published Iceberg table. Where this skill says SYS view, it means specifically the live in-cluster object you query on the cluster itself — that is a view, and it is a different thing from the published S3 Tables copy. This applies to both Provisioned clusters and Serverless namespaces. It is an opt-in extension of the existing logging APIs. Published tables are read-only, stored in the AWS-managed aws-redshift table bucket, and queryable via any Iceberg-compatible engine including Amazon Athena and Amazon Redshift itself. Querying the S3 Tables copy is preferred over the live in-cluster SYS views when analyzing historical or high-volume system-table data because: The in-cluster SYS views have a limited retention window; S3 Tables retains history well beyond it. Querying S3 Tables adds no load to the running Redshift cluster. The logs are Iceberg tables, so they can be queried at scale from any Iceberg-compatible engine and joined with other lake data. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aws/querying-aws-redshift