aws avatar

Querying Data Lake

Runs Athena SQL queries across Glue, S3 Tables, and Redshift catalogs with proper workgroup selection and cost tracking. It classifies statements before execution (SELECT versus DROP), delegates fuzzy table lookups to the finding skill, and profiles unfamiliar tables before analytical queries. The standout bit is how it handles catalog-specific addressing quirks (Redshift lowercase identifiers, cross-catalog qualifiers) and enforces confirmation gates for destructive operations. Works through AWS MCP server when available, falls back to CLI otherwise. Most useful when you need to query federated sources without manually wrangling workgroup configs or accidentally running unscoped queries that scan entire tables.

skills.sh installs
7.1K
GitHub stars
3.4K
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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.

Sponsors

Details

Repository
github.com/aws/agent-toolkit-for-aws
Categories
AI & Agent Building, Cloud & Infrastructure, Databases
First seen
May 16, 2026

More from aws/agent-toolkit-for-aws

All 56
1openai avatarfigma-implement-designopenai/skillsTranslates Figma designs into production-ready application code with 1:1 visual fidelity. Use when implementing UI code from Figma files, when user mentions "im7Kskills.sh installs
2agricidaniel avatarseo-dataforseoagricidaniel/claude-seoLive SEO data via DataForSEO MCP server: SERP analysis, keyword research (volume, difficulty, intent, trends), backlink profiles, on-page analysis, competitor a6.8Kskills.sh installs
3belt-sh avatarbeltbelt-sh/cliUse the belt CLI — run 250+ AI apps, manage knowledge, search skills, connect MCP servers. Purpose-built CLI interface for agent workflows — typed inputs, schem6.8Kskills.sh installs
4aws avatarsetting-up-ec2-instance-profilesaws/agent-toolkit-for-awsConfigures EC2 instances to securely call AWS services by creating and attaching IAM roles via instance profiles, eliminating hardcoded credentials. Use when an6.6Kskills.sh installs
5assistant-ui avatartoolsassistant-ui/skillsRegisters LLM tools and renders custom tool-call UI in assistant-ui (@assistant-ui/react). Covers the current authoring model: a "use generative" file exporting6.5Kskills.sh installs
6assistant-ui avatarsetupassistant-ui/skillsInstalls and configures assistant-ui in a project via the CLI, and picks the right runtime for a backend. Use for first-time install, scaffold, or config: `npx 6.3Kskills.sh installs