Analytics Skills
Skill 75 of 156
Migrates a Glue Data Catalog Hive table (Parquet) into Amazon S3 Tables as managed Iceberg using the native S3 Tables migration API (StartTableMigration, SyncTableMigration…
8 minutes · 1,665 words · 14 sections
Install
npx skills add aws/agent-toolkit-for-aws --skill migrating-hive-tables-to-s3-tablesnpx skills add aws/agent-toolkit-for-aws/plugin marketplace add aws/agent-toolkit-for-awsThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
This skill guides an agent through migrating one Glue Hive Parquet table into an S3 table bucket with the native S3 Tables migration API. Amazon S3 Tables plans the migration, reports column and object compatibility, copies the data, and keeps the destination in sync with the source until you complete it. Your coding agent, following this skill, runs preflight checks, starts the migration, presents the plan for approval, monitors progress, completes the migration, and validates the result.
When the AWS MCP Server is available, use it to load this skill and its references
(aws___retrieve_skill, with file="references/<name>.md") and to run the AWS calls.
Agent instruction: You MUST present the migration plan and obtain explicit user approval
before any step that changes tables, data, metadata, or catalog entries, and before any IAM, KMS,
or S3 bucket change (creating or editing a role or policy, editing a key policy, creating a report
bucket). Show the exact JSON or command first. For a key policy, read it with get-key-policy,
add one statement, and never replace the whole policy. The plan MUST list:
INSERT/MERGE, CDC);Up-front approval in the user’s request (naming the source, destination, and intent to migrate)
covers only read-only checks and a Start with plan review. Approving the plan, accepting any
setNull or drop policy, Complete, and any delete always need explicit approval during the
conversation. If the actual state differs from what was approved (a different schema,
partition layout, row count, or resource), stop, explain the difference, and get approval again.
Confirm these constraints with the user as part of the plan:
See Migrating tables to S3 Tables (opens in a new tab) for the full list of supported sources and limits.
Runtime: works with or without the AWS MCP server; steps use AWS CLI syntax. The AWS MCP server is recommended for sandboxed execution and audit logging. The migration commands are part of
aws s3tables; if an older CLI lacks them, see references/api-setup.md (opens in a new tab).
Use this skill when the source is a Glue Data Catalog Hive table with Parquet data
(TableType=EXTERNAL_TABLE, Hive Parquet SerDe) and the destination is an S3 table bucket in the
same account and Region:
The names below are other agent skills. For these requests, do not use this skill; load the named skill instead. When asked when not to use this skill, list every case:
ingesting-into-data-lake skill (this skill covers only the managed migration API).ingesting-into-data-lake skill.ingesting-into-data-lake skill.creating-data-lake-table skill.querying-data-lake skill.finding-data-lake-assets skill. Auditing the catalog: use the exploring-data-catalog skill.connecting-to-data-source skill.<db>.<tbl> into my table bucket <name>.”<tbl>.”<id>“ → Get.succeeded run has no failed objects.incompatibleValuesPolicy: setNull
and unmatchedSourceFieldsPolicy: drop apply to the whole column and the run still reports
succeeded. Treat any setNull or dropped column as data loss that needs explicit approval.| API | Purpose | Phase |
|---|---|---|
StartTableMigration | Plan and begin a migration. With --review-migration-plan, pauses at pendingReview. | Start |
GetTableMigration | Returns state, hasValidPlan, planningStats, migrationStats, migrationOutput, failureReason. | Track, review |
UpdateTableMigration | Approve (--requested-state queued) or cancel. | Approve |
SyncTableMigration | Apply source changes since the last plan; repeat until current. | Sync |
CompleteTableMigration | Promote the destination to read-write. Takes --table-arn. Returns an empty body; the migration state stays succeeded. Confirm with get-table (managedByService is null). | Complete |
ListTableMigrations | List migrations for one table bucket or table. | Discover |
Request and response shapes are in references/lifecycle.md (opens in a new tab).
start-table-migration --review-migration-plan; planning → pendingReview.get-table-migration; read the compatibility reports and present the plan for approval.update-table-migration --requested-state queued; poll migrating → succeeded.sync-table-migration; repeat until current.succeeded table, before Complete, query the destination in Athena and compare with the source → references/validation.md (opens in a new tab). Validation is part of every migration: run the row-count and sample checks without being asked, unless the user opts out. If counts are short, reconcile with sync-table-migration (not possible after Complete).complete-table-migration --table-arn ..., then confirm get-table shows managedByService null.Phases 2 to 7 are in references/lifecycle.md (opens in a new tab).
Do not call start-table-migration until all of these pass. Commands are in
references/preflight.md (opens in a new tab) and references/iam-roles.md (opens in a new tab).
sts get-caller-identity succeeds; the source and destination are in the same account and region.TableType=EXTERNAL_TABLE, Hive Parquet format and SerDe; not Iceberg, not ACID/transactional, no storage handler. Record catalogId.UNSUPPORTED_PARTITIONS. Check for partition projection and skip.header.line.count.NotFoundException.migration.s3tables.amazonaws.com, conditions aws:SourceAccount and aws:SourceArn.iam:PassRole on the role, conditioned on iam:PassedToService = migration.s3tables.amazonaws.com.kms:Decrypt and kms:GenerateDataKey. For an SSE-KMS destination, the key policy must also allow maintenance.s3tables.amazonaws.com, or table creation fails and planning never completes (see preflight (opens in a new tab) §7 and IAM roles (opens in a new tab)).Full detail in references/validation.md (opens in a new tab).
Run checks 1 to 7 on the succeeded table before Complete, because Sync is refused after Complete. After Complete, only confirm that get-table shows managedByService null.
state: succeeded, failureReason null.objectsFailedMigration is 0 and objectsMigrated matches the planned object count. If it differs, check the source object count (an extra file from an earlier sync is legitimate) and confirm with row-count parity before treating it as a failure.count(*) equals source.Lossless, Widened, Converted) was accepted in the plan; none is Incompatible or Unsupported."s3tablescatalog/<table-bucket>"."<namespace>"."<table>".sourceType = glueTable (top level) and source = {"glueTable":{"catalogId":"<acct>","databaseName":"<db>","tableName":"<tbl>"}}. catalogId is required. The role member is roleARN.--destination-table = {"tableBucketARN":"<arn>","namespace":"<ns>","name":"<tbl>"}.migrationOutput is required: {bucket, prefixes}, where bucket is a general-purpose bucket ARN and prefixes optionally sets tableCompatibilityReport, objectCompatibilityReport, objectMigrationReport.dataMigration.migrationPolicies: unmatchedSourceFieldsPolicy (fail | drop), incompatibleValuesPolicy (fail | setNull). Both default fail.sts:ExternalId to the trust policy; Amazon S3 Tables does not send one.new → planning → pendingReview → queued → migrating → succeeded, plus failed, cancelling, cancelled.hasValidPlan is true, resume with sync-table-migration; otherwise delete the table and start again. Rules in references/lifecycle.md (opens in a new tab).succeeded migration. Completing twice returns 409 ConflictException or 400 BadRequestException; treat either as “already done.”"s3tablescatalog/<table-bucket>"."<namespace>"."<table>". Requires the table bucket to be integrated with the Glue Data Catalog.migration.s3tables.amazonaws.com with aws:SourceAccount and aws:SourceArn conditions; permissions scoped to the exact source, destination, and report resources.maintenance.s3tables.amazonaws.com in its key policy.| File | Topic |
|---|---|
| references/api-setup.md (opens in a new tab) | Confirming the migration commands are in the aws s3tables CLI |
| references/preflight.md (opens in a new tab) | Credentials, source checks, partition locations, Lake Formation, destination |
| references/iam-roles.md (opens in a new tab) | Caller policy and migration role trust and permissions |
| references/lifecycle.md (opens in a new tab) | State machine and per-phase calls: start, review, approve, sync, complete |
| references/validation.md (opens in a new tab) | Athena row-count, aggregate, and sample checks; catalog naming |
| references/troubleshooting.md (opens in a new tab) | failureReason codes and fixes |
Migrates a Glue Data Catalog Hive table (Parquet) into Amazon S3 Tables as managed Iceberg using the native S3 Tables migration API (StartTableMigration, SyncTableMigration, CompleteTableMigration), a managed service call, not a self-run CTAS, Glue, or EMR job. The source is a Hive table; an Iceberg source is never in scope, even when the destination is S3 Tables. Covers plan review, migrate, sync, complete, and validate. Same-account, same-region, Glue Hive Parquet source only. Use when the request asks to migrate or import a Hive table into S3 Tables, or names the native migration API. Not applicable to converting a self-managed or standard Iceberg table into S3 Tables (ingesting-into-data-lake covers that), self-run CTAS/Glue-ETL/Spark migrations (ingesting-into-data-lake), or creating empty tables (creating-data-lake-table).
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
main, last pushed 7 November 2026.SKILL.md, not by matching a directory convention. 22 distinct layouts observed: plugins/aws-agents-for-devsecops/skills/*/SKILL.md, plugins/aws-agents/skills/*/SKILL.md, plugins/aws-core/skills/*/SKILL.md, plugins/aws-startup-advisor/skills/*/SKILL.md, skills/core-skills/*/SKILL.md, skills/specialized-skills/analytics-skills/*/SKILL.md, skills/specialized-skills/aws-marketplace-skills/*/SKILL.md, skills/specialized-skills/customer-communications-skills/*/SKILL.md, skills/specialized-skills/database-skills/*/SKILL.md, skills/specialized-skills/ec2-skills/*/SKILL.md, skills/specialized-skills/end-user-computing-skills/*/SKILL.md, skills/specialized-skills/media-services-skills/*/SKILL.md, skills/specialized-skills/migration-and-modernization-skills/*/SKILL.md, skills/specialized-skills/networking-and-content-delivery-skills/*/SKILL.md, skills/specialized-skills/operations-skills/*/SKILL.md, skills/specialized-skills/quantum-computing-skills/*/SKILL.md, skills/specialized-skills/resilience-skills/*/SKILL.md, skills/specialized-skills/security-and-identity-skills/*/SKILL.md, skills/specialized-skills/serverless-skills/*/SKILL.md, skills/specialized-skills/storage-skills/*/SKILL.md, skills/specialized-skills/system-table-skills/*/SKILL.md, skills/specialized-skills/web-and-mobile-development/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by Amazon Web Services, declaring 5 plugins. It is read for editorial metadata only — never as the skill index, which is always the repository tree./aws/agent-toolkit-for-aws.md, and each skill at its own .md URL.6 files · 66 KB
Everything this skill ships beside its prose. All of it is set here, as subchapters of skill 75.
Documentation the agent loads on demand, rather than up front.