querying-data-lake
An agent skill by aws, from aws/agent-toolkit-for-aws. Tags: analytics, athena, data, querying, sql.
What it does
Execute and manage Athena SQL queries across default and federated catalogs (Glue, S3 Tables, Redshift). Triggers on phrases like: query data, run SQL, athena query, analyze table, SQL query, workgroup status, profile table, query Redshift catalog, query S3 Tables. Do NOT use for finding specific data assets (use finding-data-lake-assets), full catalog audits (use exploring-data-catalog), importing data (use ingesting-into-data-lake).
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add aws/agent-toolkit-for-aws --skill querying-data-lake
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/aws/agent-toolkit-for-aws
cp -r agent-toolkit-for-aws/plugins/aws-data-analytics/skills/querying-data-lake ~/.claude/skills/querying-data-lake
Safety box score
Grade C, moderate risk: 30 of 100 risk points, rated 2026-10-18. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill runs Athena SQL against AWS data lake catalogs and can do so through AWS credentials from the local environment. The main risks are broad remote query execution, possible data exposure across federated/catalog joins, and the ability to run destructive SQL after confirmation.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 2 (moderate) | It explicitly executes SQL through AWS APIs/CLI, including `aws athena start-query-execution`, and supports DDL/DML such as `INSERT`, `UPDATE`, `DELETE`, `DROP`, and `MERGE`. |
| Network access | 2 (moderate) | Queries are sent to AWS Athena and federated catalogs; the skill warns that cross-catalog joins and Redshift-federated queries incur network overhead and full-table scans. |
| Filesystem reach | 1 (low) | It accepts SQL as "a pointer to a file containing SQL," so it can read local files, but there is no write/delete behavior outside the project. |
| Secrets & credentials | 1 (low) | It requires `aws sts get-caller-identity` and operates under whatever AWS credentials are already configured, but it does not read key files or ask the user to paste secrets. |
| Privilege & persistence | 0 (none) | No sudo, service registration, global installs, shell startup edits, or other local privilege changes appear in the files. |
| Instruction hijack surface | 0 (none) | There is no hidden text or instruction to ignore higher-level rules; the scan hit about confirmation is a safety constraint, not prompt injection. |
| Irreversible actions | 2 (moderate) | It can auto-select workgroups, profile tables, and execute queries end-to-end, including destructive statements once the user confirms. |
| Transparency | 0 (none) | All shipped content is plain markdown; there are no binaries, base64 blobs, generated installers, or unpinned remote fetches. |
Before installing
- Read `SKILL.md` around `aws athena start-query-execution` and the destructive SQL table.
- Confirm which AWS identity it will use by running `aws sts get-caller-identity` in a scratch session.
- Verify the Athena workgroup output S3 location and IAM permissions before letting it run queries.
- If you plan to use SQL-from-file, make sure the file path is one you trust and contains no secrets.
Rated 2026-10-18 by an automated review of 3 files from the skill's repository.
Source
- Repository
- aws/agent-toolkit-for-aws (all skills from this repository)
- Path
- plugins/aws-data-analytics/skills/querying-data-lake/SKILL.md
- Branch
- main
- Collection
- aws-data-analytics
- Updated
- 2026-09-19
Related skills
- querying-aws-cloudwatch — Runs SQL queries on CloudWatch Logs data exported as Apache Iceberg tables in S3 Tables.
- querying-aws-s3 — Queries S3 object metadata, tracks bucket activity, audits object changes, searches annotations.
- financial-data-collector — Collect real financial data for any US publicly traded company from free public sources (yfinance).
- aws-messaging-and-streaming — Guides general use of AWS messaging and streaming services.
- analytics — When the user wants to set up, improve, or audit analytics tracking and measurement.
- attribution — When the user wants to figure out which marketing actually drives conversions and revenue, choose or interpret an attribution model.