querying-aws-s3
An agent skill by aws, from aws/agent-toolkit-for-aws. Tags: analytics, athena, aws, s3, sql.
What it does
Queries S3 object metadata, tracks bucket activity, audits object changes, searches annotations, and analyzes storage metrics using S3 Metadata system tables (journal, inventory, annotation) and S3 Storage Lens tables via Athena SQL. Applies when counting objects, finding recent uploads or deletions, identifying who wrote to a prefix, breaking down storage classes, finding objects by tag, searching annotation content, analyzing storage lens metrics, or enabling S3 Metadata tracking. Prefers system tables over raw S3 APIs (list-objects-v2, head-object) at scale. Trigger phrases: bucket activity, object count, who uploaded, track deletions, storage class breakdown, find by tag, search annotations, storage lens metrics, audit bucket changes.
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-aws-s3
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/skills/specialized-skills/system-table-skills/querying-aws-s3 ~/.claude/skills/querying-aws-s3
Safety box score
Grade C, moderate risk: 42 of 100 risk points, rated 2026-10-19. 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 queries AWS S3 Metadata and Storage Lens via Athena, and it can also enable metadata tracking, Storage Lens export, and Glue federated catalog registration. The main risks are cloud-side configuration changes and exposure of sensitive audit fields like requester IDs and source IP addresses.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 2 (moderate) | It expects the agent to run AWS CLI commands and Athena SQL such as `aws s3api get-bucket-metadata-configuration` and `aws glue create-catalog`; there is no shipped script, but it does execute shell commands against AWS. |
| Network access | 2 (moderate) | All useful actions talk to remote AWS services (`s3api`, `s3control`, `glue`, Athena SQL), so bucket metadata and query results are sent over the network to AWS endpoints. |
| Filesystem reach | 0 (none) | The skill does not read, write, or delete local files or dotfiles; it only references AWS resources and CLI commands. |
| Secrets & credentials | 2 (moderate) | It explicitly queries fields that can reveal sensitive operational data, including `requester` and `source_ip_address` in the journal table. |
| Privilege & persistence | 2 (moderate) | It requires AWS permissions to configure S3 Metadata, Storage Lens, and Glue federation, and it warns that Athena workgroup encryption must be configured. |
| Instruction hijack surface | 0 (none) | There is no instruction to ignore system rules, hide actions, or follow external content; the text is procedural AWS guidance. |
| Irreversible actions | 2 (moderate) | It can change AWS-side configuration by running `create-bucket-metadata-configuration`, `put-storage-lens-configuration`, and `create-catalog`, which alter bucket/account setup without editing local files. |
| Transparency | 0 (none) | The only file is plain markdown; there are no binaries, minified assets, or decoded-at-runtime code. |
Before installing
- Confirm you want a skill that can enable S3 Metadata and Storage Lens exports on a bucket.
- Verify the Athena workgroup already enforces SSE-KMS result encryption.
- Check the IAM principal is limited to the intended AWS account, bucket, and Glue catalog.
- Review whether journal queries may expose requester IDs and source IP addresses.
Rated 2026-10-19 by an automated review of 1 file from the skill's repository.
Source
- Repository
- aws/agent-toolkit-for-aws (all skills from this repository)
- Path
- skills/specialized-skills/system-table-skills/querying-aws-s3/SKILL.md
- Branch
- main
- 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-data-lake — Execute and manage Athena SQL queries across default and federated catalogs (Glue, S3 Tables, Redshift).
- querying-aws-redshift — Enables Redshift system-table (SYS_*) log publishing to S3 Tables in Apache Iceberg format for both Provisioned clusters and Serverless namespaces.
- amazon-opensearch-service — Guides migration, provisioning, search, log-analytics, trace-analytics.
- aurora-dsql — Provisions and manages Aurora DSQL clusters, connects via psql or DSQL Connectors, manages schemas, runs queries, migrates from MySQL, diagnoses query plans.
- dms-schema-conversion — Handles the full DMS Schema Conversion lifecycle including creating migration projects, converting database schemas to a target engine.