querying-data-lake

Execute Athena SQL queries across Glue, S3 Tables, and Redshift catalogs.

2.3k|234|Updated Apr 23, 2026
One-click install
npx skills add https://github.com/aws/agent-toolkit-for-aws --skill querying-data-lake-aws
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: querying-data-lake
Source: https://github.com/aws/agent-toolkit-for-aws/tree/main/plugins/aws-data-analytics/skills/querying-data-lake
Command: npx skills add https://github.com/aws/agent-toolkit-for-aws --skill querying-data-lake-aws

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

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

Core Features & Use Cases

  • Execute queries across default and federated catalogs with workgroup selection, target asset resolution via finding-data-lake-assets, statement classification, and cost and data-scanned reporting.
  • Leverage the AWS MCP server for sandboxed execution and audit logging; the same AWS CLI commands work when the MCP server is unavailable.
  • Enable safe, scalable data querying across multiple data sources without manual catalog enumeration.

Quick Start

Provide a SQL query or a named query and let the AI select a workgroup, resolve the target asset, and execute the query.

Frequently Asked Questions about querying-data-lake

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Athena SQL queries across federated catalogs like Glue, S3 Tables, and Redshift?

Run Athena SQL queries across federated catalogs by selecting a workgroup, resolving the target asset, and executing the statement with automatic cost and data-scanned reporting. The query execution validates credentials, classifies statements for safety, and enforces workgroup output location confirmation.

Do I need the AWS MCP server to execute Athena queries in a sandboxed environment?

You do not need the AWS MCP server to execute Athena queries. The MCP server provides sandboxed execution and audit logging when available, but the same queries run using standard AWS CLI commands when the MCP server is unavailable.

How does statement classification protect data when executing Athena SQL queries?

Statement classification protects Athena SQL queries by evaluating the SQL type before execution. It enforces safe execution controls that validate credentials and confirm workgroup output locations, ensuring only authorized statements run across Glue, S3 Tables, and Redshift catalogs.

What is the best way to select a workgroup and resolve target assets for Athena queries?

The best way to select a workgroup and resolve target assets is to provide a SQL query or named query. The system delegates target asset resolution to discovery guides, automating workgroup selection and asset resolution across default and federated catalogs without manual enumeration.

Can I track query cost and data scanned when running Athena queries across multiple data sources?

You can track query cost and data scanned when running Athena queries across multiple data sources. The execution automatically reports cost analysis and data-scanned metrics after running statements across Glue, S3 Tables, and Redshift with workgroup selection.

Why does my Athena query require workgroup output location confirmation before execution?

Athena queries require workgroup output location confirmation as a safe execution control. This validation ensures query results are written to the correct location and credentials are verified before running statements across default and federated catalogs.