aws avatar

Querying Data Lake

Executes Athena SQL across default and federated catalogs with workgroup selection and statement safety checks.

CCM score
70 of 100
skills.sh installs
7.3K
GitHub stars
3.5K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers workgroup selection, asset resolution, schema profiling, query building, statement classification, execution, and error recovery
  • Supports Glue, S3 Tables, and Redshift catalogs, with table addressing rules for each catalog type
  • Enforces confirmation before destructive statements such as INSERT, DELETE, and DROP, and before cross-catalog joins
  • Designed for analysts running ad hoc SQL against AWS data lakes through the AWS MCP server or the aws athena CLI

Install

$ npx -y skills add aws/agent-toolkit-for-aws --skill querying-data-lake -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Query Data Lake

Execute SQL queries on Amazon Athena across default and federated catalogs (Glue, S3 Tables, Redshift) with workgroup selection, statement classification, and error recovery.

Overview

Executes and manages Athena SQL queries across default and federated catalogs. Selects a workgroup, resolves target assets (delegating fuzzy references to finding-data-lake-assets), classifies statements for safety, and reports cost and data scanned. Use the AWS MCP server for sandboxed execution and audit logging; the same AWS CLI commands work directly when the MCP server is not available.

Constraints for parameter acquisition:

  • You MUST accept a single optional argument: SQL text, a named-query name, a workgroup name, a catalog name, or profile TABLE_NAME
  • You MUST accept the argument as direct text or a pointer to a file containing SQL
  • You MUST ask the user for the target AWS region if not already set
  • You MUST confirm the output S3 location before executing any non-trivial query
  • You MUST respect the user's decision to abort at any step

Common Tasks

1. Verify Dependencies

Check for required tools and AWS access before running queries.

Details

Repository
github.com/aws/agent-toolkit-for-aws
Categories
Databases, Data Science & Analytics
First seen
May 16, 2026

More from aws/agent-toolkit-for-aws

All 54

Similar to Querying Data Lake

More Databases