/querying-aws-sagemaker-catalog
Runs SQL analytics on SageMaker Catalog asset metadata tables exported as Apache Iceberg in S3 Tables. Covers governance queries, asset growth tracking, ownership audits, time-travel over catalog state, and metadata quality analysis. Applies when querying catalog inventory,
$ npx -y skills add aws/agent-toolkit-for-aws --skill querying-aws-sagemaker-catalog --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/querying-aws-sagemaker-catalog
Context preview
The summary Claude sees to decide when to auto-load this skill.
Runs SQL analytics on SageMaker Catalog asset metadata tables exported as Apache Iceberg in S3 Tables. Covers governance queries, asset growth tracking, ownership audits, time-travel over catalog state, and metadata quality analysis. Applies when querying catalog inventory,
SKILL.md
querying-aws-sagemaker-catalog.SKILL.mdname: querying-aws-sagemaker-catalog
description: >-
Runs SQL analytics on SageMaker Catalog asset metadata tables exported as Apache Iceberg in
S3 Tables. Covers governance queries, asset growth tracking, ownership audits, time-travel
over catalog state, and metadata quality analysis. Applies when querying catalog inventory,
finding assets without descriptions, comparing catalog snapshots, or auditing data
ownership. Trigger phrases: catalog inventory SQL, how many assets, assets without
descriptions, asset growth over time, who owns this data, catalog governance, data quality
audit, catalog analytics.
version: 1
argument-hint: "[query|domain-id|'configure'|'status']"
Query AWS SageMaker Catalog System Tables
Overview
**Works best with** the [AWS MCP server](https://docs.aws.amazon.com/aws-mcp/) for sandboxed execution and audit logging. All commands below use the AWS CLI and work in any environment with configured AWS credentials.
Amazon SageMaker Unified Studio (whose catalog feature is referred to below as SageMaker Catalog) exports asset metadata as a daily-snapshot Apache Iceberg table in the AWS-managed `aws-sagemaker-catalog` table bucket. This enables SQL queries over your entire data catalog inventory — asset counts, governance gaps, ownership audits, and historical comparisons — without building custom ETL.
Data is partitioned by `snapshot_time` and exported once daily (around midnight per region). The table is read-only.
Decision Tree
| User intent | Use this skill? | Alternative | |---|---|---| | SQL analytics on catalog state (counts, governance, trends) | **Yes** | — | | Historical comparison ("what changed in catalog last week") | **Yes** — time travel via `snapshot_time` | — | | Find assets without owners or descriptions | **Yes** | — | | Find a specific table by name or concept | **No** | `finding-data-lake-assets` or Glue Discovery `search` | | Browse/enumerate catalog interactively | **No** | `exploring-data-catalog` | | Run a query *on* a table's data | **No** | `querying-data-lake` | | Manage catalog metadata (add descriptions, tags) | **No** | Glue Discovery `put-form-type` / `associate-glossary-terms` |
Common Tasks
1. Check If Configured
aws datazone get-data-export-configuration \
--domain-identifier <DOMAIN_ID> \
--region <REGION>
- If no domain exists: `aws datazone list-domains --region <REGION>`
- If export not enabled: guide user to enable.
- One domain per account per region.
Verify table bucket exists:
aws s3tables list-table-buckets --region <REGION> \
--query "tableBuckets[?name=='aws-sagemaker-catalog']"
2. Enable
**With KMS encryption (recommended for production):**
aws datazone put-data-export-configuration \
--domain-identifier <DOMAIN_ID> \
--region <REGION> \
--enable-export \
--encryption-configuration kmsKeyArn=<KMS_KEY_ARN>,sseAlgorithm=aws:kms
> **Note**: Encryption cannot be changed after creation. Always specify KMS for sensitive catalog data.
Without encryption (for quick testing only):
aws datazone put-data-export-configuration \
--domain-identifier <DOMAIN_ID> \
--region <REGION> \
--enable-export
First data available within 24 hours. See: [Exporting asset metadata](https://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/export-asset-metadata.html)
3. Verify Permissions for Querying
Requires:
- S3 Tables federated catalog registered in Glue (`s3tablescatalog`)
- Lake Formation SELECT + DESCRIBE grants on the table
Grant access:
aws lakeformation grant-permissions \
--principal DataLakePrincipalIdentifier=<ROLE_ARN> \
--resource '{"Table": {"CatalogId": "<ACCOUNT>:s3tablescatalog/aws-sagemaker-catalog", "DatabaseName": "asset_metadata", "Name": "asset"}}' \
--permissions DESCRIBE SELECT \
--region <REGION>4. Query
**Query syntax:**
"s3tablescatalog/aws-sagemaker-catalog"."asset_metadata"."asset"
**Constraints:**
- You MUST always filter by `snapshot_time` — without it, the query scans all historical snapshots and returns duplicates
- You MUST confirm workgroup and output location before executing
- Default to `DATE(snapshot_time) = CURRENT_DATE` for current state
- You SHOULD use the key columns documented in this skill to build queries. If you need the full schema, run `get-tables` once:
aws glue get-tables --catalog-id "<ACCOUNT>:s3tablescatalog/aws-sagemaker-catalog" --database-name "asset_metadata" --region <REGION>
**Key columns:**
| Column | What it holds | Usage | |--------|--------------|-------| | `snapshot_time` | Partition key — daily snapshot timestamp | **Always filter on this** | | `asset_id` | Unique catalog asset identifier | Primary key for lookups | | `resource_type_enum` | GlueTable, RedshiftTable, S3Collection, etc. | Filter by asset type | | `resource_id` | ARN or native identifier | Cross-reference with source systems | | `asset_name` | Business-friendly name | Display, search | | `resource_name` | Technical name (table name, prefix) | Filtering | | `business_description` | Business context (NULL if not provided) | Governance gaps | | `extended_metadata` | `map<string,string>` — flexible key-value attributes | Use bracket notation: `extended_metadata['owningEntityId']` | | `asset_created_time` | When asset first appeared in catalog | Growth analysis | | `asset_updated_time` | Last modification time | Freshness checks |
**Current catalog state:**
SELECT resource_type_enum, COUNT(*) as count
FROM "s3tablescatalog/aws-sagemaker-catalog"."asset_metadata"."asset"
WHERE DATE(snapshot_time) = CURRENT_DATE
GROUP BY resource_type_enum
ORDER BY count DESC;
**Assets without business descriptions:**
SELECT asset_name, resource_name, resource_type_enum, account_id
FROM "s3tablescatalog/aws-sagemaker-catalog"."asset_metadata"."asset"
WHERE DATE(snapshot_time) = CURRENT_DATE
AND business_description IS
Read more
name: querying-aws-sagemaker-catalog description: >- Runs SQL analytics on SageMaker Catalog asset metadata tables exported as Apache Iceberg in S3 Tables. Covers governance queries, asset growth tracking, ownership audits, time-travel over catalog state, and metadata quality analysis. Applies when querying catalog inventory, finding assets without descriptions, comparing catalog snapshots, or auditing data ownership. Trigger phrases: catalog inventory SQL, how many assets, assets without descriptions, asset growth over time, who owns this data, catalog governance, data quality audit, catalog analytics. version: 1 argument-hint: "[query|domain-id|'configure'|'status']"
Query AWS SageMaker Catalog System Tables
Overview
**Works best with** the [AWS MCP server](https://docs.aws.amazon.com/aws-mcp/) for sandboxed execution and audit logging. All commands below use the AWS CLI and work in any environment with configured AWS credentials.
Amazon SageMaker Unified Studio (whose catalog feature is referred to below as SageMaker Catalog) exports asset metadata as a daily-snapshot Apache Iceberg table in the AWS-managed `aws-sagemaker-catalog` table bucket. This enables SQL queries over your entire data catalog inventory — asset counts, governance gaps, ownership audits, and historical comparisons — without building custom ETL.
Data is partitioned by `snapshot_time` and exported once daily (around midnight per region). The table is read-only.
Decision Tree
| User intent | Use this skill? | Alternative | |---|---|---| | SQL analytics on catalog state (counts, governance, trends) | **Yes** | — | | Historical comparison ("what changed in catalog last week") | **Yes** — time travel via `snapshot_time` | — | | Find assets without owners or descriptions | **Yes** | — | | Find a specific table by name or concept | **No** | `finding-data-lake-assets` or Glue Discovery `search` | | Browse/enumerate catalog interactively | **No** | `exploring-data-catalog` | | Run a query *on* a table's data | **No** | `querying-data-lake` | | Manage catalog metadata (add descriptions, tags) | **No** | Glue Discovery `put-form-type` / `associate-glossary-terms` |
Common Tasks
1. Check If Configured
aws datazone get-data-export-configuration \ --domain-identifier <DOMAIN_ID> \ --region <REGION>
- If no domain exists: `aws datazone list-domains --region <REGION>`
- If export not enabled: guide user to enable.
- One domain per account per region.
Verify table bucket exists:
aws s3tables list-table-buckets --region <REGION> \ --query "tableBuckets[?name=='aws-sagemaker-catalog']"
2. Enable
**With KMS encryption (recommended for production):**
aws datazone put-data-export-configuration \ --domain-identifier <DOMAIN_ID> \ --region <REGION> \ --enable-export \ --encryption-configuration kmsKeyArn=<KMS_KEY_ARN>,sseAlgorithm=aws:kms
> **Note**: Encryption cannot be changed after creation. Always specify KMS for sensitive catalog data.
Without encryption (for quick testing only):
aws datazone put-data-export-configuration \ --domain-identifier <DOMAIN_ID> \ --region <REGION> \ --enable-export
First data available within 24 hours. See: [Exporting asset metadata](https://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/export-asset-metadata.html)
3. Verify Permissions for Querying
Requires:
- S3 Tables federated catalog registered in Glue (`s3tablescatalog`)
- Lake Formation SELECT + DESCRIBE grants on the table
Grant access:
aws lakeformation grant-permissions \
--principal DataLakePrincipalIdentifier=<ROLE_ARN> \
--resource '{"Table": {"CatalogId": "<ACCOUNT>:s3tablescatalog/aws-sagemaker-catalog", "DatabaseName": "asset_metadata", "Name": "asset"}}' \
--permissions DESCRIBE SELECT \
--region <REGION>4. Query
**Query syntax:**
"s3tablescatalog/aws-sagemaker-catalog"."asset_metadata"."asset"
**Constraints:**
- You MUST always filter by `snapshot_time` — without it, the query scans all historical snapshots and returns duplicates
- You MUST confirm workgroup and output location before executing
- Default to `DATE(snapshot_time) = CURRENT_DATE` for current state
- You SHOULD use the key columns documented in this skill to build queries. If you need the full schema, run `get-tables` once:
aws glue get-tables --catalog-id "<ACCOUNT>:s3tablescatalog/aws-sagemaker-catalog" --database-name "asset_metadata" --region <REGION>
**Key columns:**
| Column | What it holds | Usage | |--------|--------------|-------| | `snapshot_time` | Partition key — daily snapshot timestamp | **Always filter on this** | | `asset_id` | Unique catalog asset identifier | Primary key for lookups | | `resource_type_enum` | GlueTable, RedshiftTable, S3Collection, etc. | Filter by asset type | | `resource_id` | ARN or native identifier | Cross-reference with source systems | | `asset_name` | Business-friendly name | Display, search | | `resource_name` | Technical name (table name, prefix) | Filtering | | `business_description` | Business context (NULL if not provided) | Governance gaps | | `extended_metadata` | `map<string,string>` — flexible key-value attributes | Use bracket notation: `extended_metadata['owningEntityId']` | | `asset_created_time` | When asset first appeared in catalog | Growth analysis | | `asset_updated_time` | Last modification time | Freshness checks |
**Current catalog state:**
SELECT resource_type_enum, COUNT(*) as count FROM "s3tablescatalog/aws-sagemaker-catalog"."asset_metadata"."asset" WHERE DATE(snapshot_time) = CURRENT_DATE GROUP BY resource_type_enum ORDER BY count DESC;
**Assets without business descriptions:**
SELECT asset_name, resource_name, resource_type_enum, account_id FROM "s3tablescatalog/aws-sagemaker-catalog"."asset_metadata"."asset" WHERE DATE(snapshot_time) = CURRENT_DATE AND business_description IS
Help AI coding agents build, deploy, and manage applications on AWS. The Agent Toolkit for AWS gives AI coding agents the tools, knowledge, and guardrails they need to work with AWS services.
Repo: aws/agent-toolkit-for-aws
Other skills on agent-toolkit-for-aws.
- /analyzing-release-readiness
Trigger a pre-merge release readiness review on a GitHub PR, GitLab MR, or local branch. Use when the user wants to analyze code changes for risk, correctness, and potential rollback issues before merging. Trigger words include release readiness, analyze PR, analyze MR, review
Open skill - /chatting-with-aws-devops-agent
Have a fast, conversational analysis with the AWS DevOps Agent. Use for cost optimization, architecture review, topology mapping, knowledge / runbook discovery, security audits, dependency questions, and quick diagnostics — anything that needs a 5-30 second answer rather than a
Open skill - /coordinating-multi-space-devops-agent
Coordinate the AWS DevOps Agent across multiple AgentSpaces from one Claude Code session — route questions to the right space (prod vs staging vs knowledge), query several spaces in parallel and synthesize, or compare findings across accounts. Use whenever the user has more than
Open skill - /diff-scanning-with-aws-security-agent
Run a fast AWS Security Agent diff scan on only the changed code since a git ref. Use when the user asks to scan changes, run a diff scan, check what changed for security issues, scan before committing, scan before PR, or any pre-commit/pre-push security check.
Open skill - /investigating-incidents-with-aws-devops-agent
Run a deep root-cause investigation on the AWS DevOps Agent. Use when the user describes an incident, alarm, outage, or unexplained behavior — keywords like "5xx", "503", "OOM", "latency spike", "deployment failure", "rollback", "sev1", "investigate", "root cause", "debug",
Open skill - /pentesting-with-aws-security-agent
Run an AWS Security Agent penetration test against a live web application — registers and verifies the target domain, exercises the supplied endpoints with the managed Security Agent service, and returns verified runtime findings. Use when the user asks to pentest, run a
Open skill

