[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A8RK16SXCP6PWDM953CM92":3,"skill-same:01M7A8RK16SXCP6PWDM953CM92":145},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M7A8RK16SXCP6PWDM953CM92","glue-job-troubleshooter",null,"Diagnoses AWS Glue ETL job failures through a seven-category diagnostic tree — Python script exceptions (KeyError, AttributeError, import errors), job timeout (insufficient DPU, long-running transforms, skewed reads), JDBC connection errors (VPC security group, subnet, network ACL, self-referencing rule), job bookmark errors (not advancing, reprocessing data, partition format change), Data Catalog errors (table not found, partition not found, stale crawler), Spark errors (executor OOM, stage failures, data skew, GC overhead), and DynamicFrame errors (schema mismatch, type coercion). Reads get-job-run ErrorMessage and ExecutionTime, CloudWatch logs (\u002Faws-glue\u002Fjobs\u002F), Spark UI exported to S3, and get-job-bookmark state. Emits ROOT_CAUSE_FOUND with the failing probe and positive evidence, NEED_MORE_INFO when a probe requires operator input, or ESCALATE for AWS-side incidents. Use when a Glue job shows FAILED, TIMEOUT, RUNNING past expected duration, or is reprocessing data the bookmark should have skipped.","jhkchan\u002Faws-agent-skills","jhkchan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1083902?v=4","01M7A2SVQYP9GQTPTDXP5JKYQ4","Jacky Chan","01M7A2SVS117YWCTZABB75HZR1",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: glue-job-troubleshooter\ndescription: Diagnoses AWS Glue ETL job failures through a seven-category diagnostic tree — Python script exceptions (KeyError, AttributeError, import errors), job timeout (insufficient DPU, long-running transforms, skewed reads), JDBC connection errors (VPC security group, subnet, network ACL, self-referencing rule), job bookmark errors (not advancing, reprocessing data, partition format change), Data Catalog errors (table not found, partition not found, stale crawler), Spark errors (executor OOM, stage failures, data skew, GC overhead), and DynamicFrame errors (schema mismatch, type coercion). Reads get-job-run ErrorMessage and ExecutionTime, CloudWatch logs (\u002Faws-glue\u002Fjobs\u002F), Spark UI exported to S3, and get-job-bookmark state. Emits ROOT_CAUSE_FOUND with the failing probe and positive evidence, NEED_MORE_INFO when a probe requires operator input, or ESCALATE for AWS-side incidents. Use when a Glue job shows FAILED, TIMEOUT, RUNNING past expected duration, or is reprocessing data the bookmark should have skipped.\nlicense: Apache-2.0\ncompatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). Offline classification works from a pasted job-run ErrorMessage, CloudWatch Logs excerpt, or Spark stage failure summary. Live-account diagnosis uses aws glue get-job-run, get-job-runs, get-job-bookmark, get-connection, aws logs filter-log-events on \u002Faws-glue\u002Fjobs, aws s3 cp for Spark UI event logs, aws glue get-table and get-partitions for catalog validation, and aws ec2 describe-security-groups \u002F...\nmetadata:\n  domain: aws-cloudops\n  complexity: high\n  requires_llm: 'true'\n  phase: '2'\n  supports_pipeline: 'true'\n  entry_point: 'false'\n  family: Analytics\n  task_type: troubleshoot\n  skill_class: capability\n  lifecycle_status: active\n  verdict_shape: ROOT_CAUSE_FOUND | NEED_MORE_INFO | ESCALATE\n  when_to_use: Diagnosing an AWS Glue ETL job that FAILED, hit TIMEOUT, is RUNNING past its expected duration, is reprocessing data the bookmark should have skipped, is throwing Python exceptions, is unable to reach a JDBC source in a VPC, is reporting Spark executor OOM or stage failures, or is surfacing Data Catalog \"table not found\" \u002F \"partition not found\" errors.\n  when_not_to_use: Glue Data Quality rule evaluation (use the Data Quality service directly), AWS Lake Formation permission errors (use Lake Formation admin tooling), Glue Studio notebook interactive development (not a job-run diagnosis), or Glue crawler schema inference tuning (use a crawler classification specialist). This skill diagnoses job-run failures, not data quality or governance.\n  activation_triggers: Glue job failed, Glue job timeout, Glue bookmark not advancing, Glue reprocessing data, Glue JDBC connection error, Glue Spark OOM, Glue stage failure, Glue table not found, Glue partition not found, DynamicFrame schema mismatch, Glue DPU capacity, Glue job RUNNING too long, Glue version 2.0 vs 3.0 vs 4.0, diagnose Glue ETL failure, Spark UI Glue\n  invocation_schema: 'Input: either (a) a Glue JobName + RunId + live-account context, (b) a pasted ErrorMessage from glue:get-job-run, OR (c) a CloudWatch Logs \u002F Spark stage failure excerpt. Output: a deterministic TARGET \u002F VERDICT \u002F REASON \u002F CATEGORY \u002F EVIDENCE \u002F REMEDIATION block per job run, where VERDICT ∈ {ROOT_CAUSE_FOUND, NEED_MORE_INFO, ESCALATE} and CATEGORY ∈ {SCRIPT_EXCEPTION, TIMEOUT_DPU, TIMEOUT_SKEW, JDBC_VPC, JDBC_CRED, BOOKMARK_STALL, CATALOG_MISSING, CATALOG_PARTITION, SPARK_OOM, SPARK_STAGE, DYNAMICFRAME_SCHEMA, DYNAMICFRAME_TYPE, UNKNOWN}.'\n  invocation_example: \"# Minimal valid input (offline classification from ErrorMessage):\\nJobName: nightly-sales-aggregation\\nRunId: jr_abc123def456\\nState: FAILED\\nErrorMessage: \\\"Traceback (most recent call last):\\n  File \\\\\\\"tmp\u002Fscript.py\\\\\\\", line 47, in \u003Cmodule>\\n    df = df.withColumn('revenue', col('price') * col('qty'))\\n  ... AttributeError: 'NoneType' object has no attribute '_jvc'\\\"\\nExecutionTime: 42\\nGlueVersion: 4.0\\nWorkerType: G.1X\\nNumberOfWorkers: 5\\nEmit the standard diagnostic block (TARGET, VERDICT, REASON,\\nCATEGORY, EVIDENCE, REMEDIATION).\"\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  keywords: AWS Glue, Glue ETL, Glue job failure, Glue job timeout, Glue bookmark, DynamicFrame, Spark OOM, data skew, JDBC connection, Glue Data Catalog, Glue version 4.0, DPU capacity, Glue Spark UI, CloudWatch logs, Glue connection, crawler, partition pruning, Python shell job, Ray job, Analytics\n  tags: glue, analytics, etl, troubleshoot, spark, data-catalog\n---\n\n# Glue Job Troubleshooter\n\n## What this skill does\n\nDiagnoses AWS Glue ETL job failures by walking a seven-category decision\ntree that maps the observed symptom (job FAILED, TIMEOUT, RUNNING too\nlong, or reprocessing bookmarked data) to a specific root cause with\npositive evidence. The skill is verdict-driven: it never emits a fix\nwithout first producing the failing probe that confirms the cause.\n\n## STRICT output contract\n\nEvery invocation MUST emit exactly one diagnostic block per job run\nin this shape — no prose before, no commentary after:\n\n```text\nTARGET: \u003Cjob-name>\u002F\u003Crun-id> or \u003Cjob-name> if RunId unknown\nVERDICT: ROOT_CAUSE_FOUND | NEED_MORE_INFO | ESCALATE\nREASON: \u003C1-2 sentences naming the failing category and the probe>\nCATEGORY: SCRIPT_EXCEPTION | TIMEOUT_DPU | TIMEOUT_SKEW |\n          JDBC_VPC | JDBC_CRED | BOOKMARK_STALL | CATALOG_MISSING |\n          CATALOG_PARTITION | SPARK_OOM | SPARK_STAGE |\n          DYNAMICFRAME_SCHEMA | DYNAMICFRAME_TYPE | UNKNOWN\nEVIDENCE:\n  - \u003Cobserved symptom — ErrorMessage, state, duration>\n  - \u003Cfailing probe — command and output that confirms the cause>\n  - \u003Cpassing probes — categories ruled out>\nREMEDIATION:\n  1. \u003Cspecific action with CLI command>\n  2. \u003Cverification command after the fix>\n```\n\nA block missing VERDICT, CATEGORY, EVIDENCE, or REMEDIATION is a\ncontract violation — re-emit the full block. NEVER combine multiple job\nruns in a single block; one run per block.\n\n## Quick start\n\n- **Start with `get-job-run` — not the script.** ErrorMessage and\n  ExecutionTime narrow the category before you open the script. A short\n  ExecutionTime with a Python traceback points to SCRIPT_EXCEPTION; a\n  timeout at the configured Timeout minutes points to TIMEOUT_*; a long\n  run with no traceback points to skew or DPU starvation.\n- **Bookmark problems hide in `get-job-bookmark`.** If a job that should\n  skip old data is reprocessing it, the bookmark is stale, missing, or\n  tracking the wrong partition column. The bookmark is per-job.\n- **JDBC failures are almost never Glue.** They are VPC security group,\n  subnet route table, or self-referencing rule problems on the Glue\n  connection. Verify connection SG, database SG, and route table before\n  assuming a Glue bug.\n- **Spark OOM is a skew or shuffling problem, not a memory problem.**\n  Throwing more DPU at an OOM rarely fixes it; the fix is salting the\n  skewed key, repartitioning before a wide transform, or moving to\n  `G.2X` only if the executor genuinely needs more heap.\n- **Glue version matters.** 2.0 = Spark 2.4 \u002F Python 3.7; 3.0 = Spark\n  3.1 \u002F Python 3.9; 4.0 = Spark 3.3 \u002F Python 3.10. A script that ran on\n  2.0 may fail on 4.0 because of Spark SQL strictness, PyArrow\n  incompatibility, or removed DataFrameWriter options.\n\n## Mindset\n\nA Glue job run is a Spark application wrapped in an AWS-managed control\nplane. Most failures are not Glue bugs — they are configuration drift\nbetween the job, the Data Catalog, the VPC, and the source data. The\nskill's job is to find the layer that drifted. The fastest path to root\ncause is to read `get-job-run` first, then narrow to the category that\nmatches the symptom signature, then run the category-specific probe\nbefore opening the script.\n\n## Quick reference — verdict thresholds\n\n| Observation | Verdict | Category |\n|---|---|---|\n| `ErrorMessage` contains Python `Traceback` | **ROOT_CAUSE_FOUND** | SCRIPT_EXCEPTION |\n| `ExecutionTime` == `Timeout`, no traceback | **ROOT_CAUSE_FOUND** | TIMEOUT_DPU \u002F TIMEOUT_SKEW |\n| Spark UI: one task reads 100x median bytes | **ROOT_CAUSE_FOUND** | TIMEOUT_SKEW |\n| `ErrorMessage` mentions `Connection refused` \u002F `VPC` | **ROOT_CAUSE_FOUND** | JDBC_VPC |\n| `ErrorMessage` mentions `Access denied` \u002F `auth failed` | **ROOT_CAUSE_FOUND** | JDBC_CRED |\n| Source grew but `get-job-bookmark` shows old marker | **ROOT_CAUSE_FOUND** | BOOKMARK_STALL |\n| `EntityNotFoundException: Table not found` | **ROOT_CAUSE_FOUND** | CATALOG_MISSING |\n| `ErrorMessage` mentions `partition` + `not found` | **ROOT_CAUSE_FOUND** | CATALOG_PARTITION |\n| Spark UI executor: `OOM` \u002F `Container killed by YARN` | **ROOT_CAUSE_FOUND** | SPARK_OOM |\n| Spark UI: failed stage with one slow task | **ROOT_CAUSE_FOUND** | SPARK_STAGE \u002F TIMEOUT_SKEW |\n| `ResolveChoice` \u002F `apply_mapping` schema errors | **ROOT_CAUSE_FOUND** | DYNAMICFRAME_SCHEMA |\n| `ExecutionTime` long but job succeeded, no probe run | **NEED_MORE_INFO** | (need Spark UI) |\n| AWS Health event for Glue in region | **ESCALATE** | (AWS-side incident) |\n\n## Pre-flight: data gate (run before any diagnosis)\n\nGlue diagnosis requires three data sources: job-run metadata (state,\nErrorMessage, ExecutionTime, configuration), CloudWatch Logs excerpt for\nthe failing run, and — for performance\u002Fskew diagnoses — the Spark UI\nevent log exported to S3.\n\nData-gate CLI (get-job-run, get-job-runs, CloudWatch Logs, bookmark state, Spark UI event log) moved to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n### Data-quality short-circuits\n\n| Condition | Effect on diagnosis |\n|---|---|\n| `get-job-run` returns `RunId not found` | Job never started under that id; verify via `get-job-runs`. |\n| `ErrorMessage` is `No ErrorReason` but `State=FAILED` | Need CloudWatch Logs to surface the exception. Emit NEED_MORE_INFO with the log-fetch step. |\n| CloudWatch log group missing | Logging disabled (`--enable-continuous-cloudwatch-log false`). Cannot diagnose script-level failures. NEED_MORE_INFO. |\n| Spark UI not enabled | Cannot diagnose skew \u002F OOM \u002F stage failures with evidence. NEED_MORE_INFO; recommend `--enable-spark-ui` and `--spark-event-logs-path` for future runs. |\n| `get-job-bookmark` returns `{}` | Bookmark reset or never written. Reprocessing is expected, not a bug. |\n| Job still `RUNNING` (not FAILED) | Diagnose as TIMEOUT_* candidate; do NOT wait for failure if past SLA. |\n\nWhen `ExecutionTime` and CloudWatch Logs disagree, trust CloudWatch for\nthe failure moment and `get-job-run` for overall duration. The\nExecutionTime counts the control-plane wrapper; the Spark application\nmay have failed earlier.\n\n## Process — Diagnostic decision tree (apply in order)\n\n### Step 0: Non-obvious behaviours that change the diagnosis\n\nStep 0 non-obvious behaviours moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n### Step 1: Job failure (Python script exceptions)\n\n**Signature:** `ErrorMessage` contains `Traceback`, OR short\n`ExecutionTime` (\u003C 5 min) with `State=FAILED`.\n\n**Failing probe:** CloudWatch Logs for the run, filtered to `Traceback`.\n\nProbe: [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — Step 1 Traceback log filter.\n\n| Exception in trace | Root cause | Fix |\n|---|---|---|\n| `KeyError: '\u003Ccolumn>'` | Schema changed since last crawl | Re-crawl; or fix script to tolerate missing column. |\n| `AttributeError: 'NoneType'...` | DataFrame API on None (read returned empty) | Check source S3 path; check partition filter. |\n| `ImportError: No module named '\u003Cpkg>'` | External Python package not installed | Add `--additional-python-modules` (Glue 3.0+). |\n| `AnalysisException: Path does not exist` | S3 source path wrong or empty | Verify `s3:\u002F\u002F` prefix; check source crawler. |\n| `SparkUpgradeException` (date parsing) | Glue version calendar change | `--conf spark.sql.legacy.timeParserPolicy=LEGACY`. |\n| `Py4JJavaError` (wrapping Java) | Spark internal — read nested cause | Surface nested Java stack; route to Step 6. |\n| `AnalysisException: cannot resolve '\u003Ccol>'` | Typo or case-sensitivity | Glue 4.0 is case-sensitive; quote column names. |\n\n**Passing probes:** `ExecutionTime \u003C Timeout` (not timeout category); no\n\"Connection refused\" (not JDBC); no YARN kill (not OOM).\n\n### Step 2: Job timeout (DPU capacity vs long-running transform)\n\n**Signature:** `ExecutionTime` == `Timeout` (±1 min), `State=TIMEOUT`\nor `FAILED`, no Python traceback.\n\n**Failing probe:** compare duration to `Timeout`; pull Spark UI stage\nsummary for task progression.\n\n```bash\njq '{state: .JobRun.State, exec: .JobRun.ExecutionTime,\n     timeout: .JobRun.Timeout, workers: .JobRun.NumberOfWorkers,\n     workerType: .JobRun.WorkerType}' job-run.json\n```\n\n| Observation | Root cause | Fix |\n|---|---|---|\n| All tasks slow; `NumberOfWorkers` \u003C 5 | DPU-starved | Raise `NumberOfWorkers` (min 5 for prod ETL). |\n| One task running 50x median | Data skew | Salt the skewed key; repartition before wide transform. |\n| Many tasks stuck on S3 `LIST`\u002F`HEAD` | Too many small files | Compact source; `--conf spark.sql.sources.partitionOverwriteMode=dynamic`. |\n| `from_catalog` slow, no partition pushdown | Full scan | Pass `push_down_predicate='year=2025 and month>=01'`. |\n| JDBC read, no partition column | Single-threaded JDBC | Add `hashfield` \u002F `hashexpression` predicate. |\n| `G.1X`, executor heap exhausted | Heap pressure | Move to `G.2X` or tune `--executor-memory`. |\n| Long-running Python UDF in `map`\u002F`flatMap` | UDF serial bottleneck | Replace with native Spark SQL; broadcast hot data. |\n\n### Step 3: JDBC connection errors (VPC, subnet, security group)\n\n**Signature:** `ErrorMessage` mentions `Connection refused`, `timed\nout`, `VPC configuration`, `Network interface`, `ENI`, or `Could not\nconnect`.\n\n**Failing probe:** verify Glue connection's SG, subnet route table, and\nthe database SG ingress.\n\nProbe: [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — Step 3 connection SG \u002F subnet \u002F DB SG \u002F route table.\n\n| Missing config | Symptom | Fix |\n|---|---|---|\n| DB SG lacks ingress from Glue SG on db port (5432\u002F3306) | `Connection refused` \u002F `timed out` | Add inbound: source = Glue SG, port = db port. |\n| Glue SG lacks egress to DB | `timed out` (egress blocked) | Add outbound: dest = DB SG \u002F CIDR, port = db port. |\n| Glue SG lacks self-referencing rule | Intermittent ENI setup fails | Add inbound: source = Glue SG itself, all ports. |\n| Subnet route table missing path to DB subnet | `timed out` | Add route via TGW \u002F peering \u002F LPG. |\n| Glue subnet in different AZ than single-AZ DB | `Connection refused` | Use a Glue connection subnet in the DB's AZ. |\n| NACL stateful mismatch | Intermittent | NACLs are stateless; check in+out on both subnets. |\n| Glue connection points to deleted subnet | ENI provisioning fails | Recreate connection with current subnet. |\n\n**Passing probes:** run `nc -vz \u003Cdb-host> \u003Cport>` from a Glue dev\nendpoint or EC2 in the same subnet. If `nc` succeeds, the path is clear\nand the issue is authentication — route to Step \"JDBC credentials\"\n(JDBC_CRED) and check the connection's JDBC URL \u002F Secrets Manager\nreference.\n\n### Step 4: Job bookmark errors (not advancing, reprocessing data)\n\n**Signature:** source S3 prefix grew, but job reprocesses files already\nrun. `get-job-bookmark` shows old or empty marker.\n\n**Failing probe:**\n\n```bash\naws glue get-job-bookmark --job-name nightly-sales-aggregation \\\n  --run-id $RUN_ID --output json\n# Inspect: bookmark[\"JobBookmarks\"][\"Attempt\"],\n# \"Args\" \u002F \"Paths\" \u002F \"partitionKeys\" structure\n```\n\n| Bookmark observation | Root cause | Fix |\n|---|---|---|\n| Returns `{}` | Bookmark disabled or reset | `--job-bookmark-option=enable`; or accept reprocess if disabled intentionally. |\n| `partitionKeys` present but source path layout changed | Layout drift | `reset-job-bookmark`; update `partitionKeys` in script. |\n| `Attempt` count > 1 across runs | Bookmark write failing | Add `glue:UpdateJobBookmark` to job role. |\n| Source has nested partitions not in `partitionKeys` | Job reads all sub-partitions | Recrawl; update `partitionKeys`. |\n| Same S3 key reprocessed | File overwritten in place | Glue bookmarks by key — overwritten files always reprocess. Design for appends. |\n| KMS-encrypted bookmark fails to read | Role lacks `kms:Decrypt` on bookmark CMK | Add KMS decrypt to job role. |\n| Glue 2.0 → 3.0+ upgrade, bookmark unreadable | Bookmark schema changed | `reset-job-bookmark` once post-upgrade; accept one reprocess. |\n\n**Passing probes:** IAM policy simulator on the job's role for\n`glue:GetJobBookmark` and `glue:UpdateJobBookmark`. Both MUST be Allow.\n\n### Step 5: Data Catalog errors (table \u002F partition not found)\n\n**Signature:** `ErrorMessage` mentions `EntityNotFoundException`,\n`Table not found`, `Database not found`, or `Partition not found`.\n\n**Failing probe:**\n\n```bash\naws glue get-table --database-name analytics_prod \\\n  --name sales_raw --output json\naws glue get-partitions --database-name analytics_prod \\\n  --table-name sales_raw --output json\naws glue get-database --name analytics_prod --output json\n```\n\n| Probe result | Root cause | Fix |\n|---|---|---|\n| `get-table` returns `EntityNotFoundException` | Table missing | Re-run crawler; or fix job table name. |\n| Table exists but in a different database | Wrong `database_name` | Fix script; database name is case-sensitive. |\n| `get-partitions` empty | Crawler never ran on partitions | Re-crawl; or `MSCK REPAIR TABLE` via Athena. |\n| Partition exists but job can't see it | Role lacks `glue:GetPartition` | Add `glue:GetPartition(s)` to job role. |\n| `from_catalog` with stale schema | Catalog schema != S3 data | Re-crawl; or `additional_options={\"useCatalogSchema\": False}`. |\n| Cross-account catalog access | Role lacks cross-account `glue:*` | Add resource-account IAM; use catalog ARN. |\n| Lake Formation tag blocks read | LF `DESCRIBE` missing | Grant LF `DESCRIBE` on table to job role. |\n\n### Step 6: Spark errors (executor OOM, stage failures, data skew)\n\n**Signature:** `ErrorMessage` mentions `OutOfMemoryError`, `Container\nkilled by YARN`, `Java heap space`, `GC overhead limit`, or stage\nfailure with `Lost task` retries.\n\n**Failing probe:** Spark UI event log — identify the failed stage, task\nattempt counts, and executor memory metrics.\n\nProbe: [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — Step 6 Spark UI event log retrieval.\n\n| Spark symptom | Root cause | Fix |\n|---|---|---|\n| One task reads 100x median bytes | Data skew | Salt the skewed key: `df.withColumn(\"salt\", (rand()*10).cast(\"int\"))`. |\n| `Container killed by YARN...memory limits` | Executor OOM | `G.1X` → `G.2X`; or reduce `spark.sql.shuffle.partitions` default. |\n| Stage retries exhausted (4 attempts) | Speculative task failures | Inspect task stack; often OOM or bad input row. |\n| `GC overhead limit exceeded` | Many small objects \u002F UDF churn | Replace PyRDD UDFs with Spark SQL; broadcast small DFs. |\n| Long pause before stage starts | Shuffle write bottleneck | Raise `spark.sql.shuffle.partitions` (200 → 1000+ for TB). |\n| Broadcast join OOM | Broadcast hash table too large | Lower `spark.sql.autoBroadcastJoinThreshold` (default 10 MB). |\n| Python worker OOM (`map`\u002F`flatMap`) | UDF returning huge objects | Paginate; or `applyInPandas` with chunking. |\n\n**Passing probes:** source volume consistent with previous successful\nruns; if so, skew is the new factor.\n\n### Step 7: DynamicFrame errors (schema mismatch, type coercion)\n\n**Signature:** log mentions `ResolveChoice`, `apply_mapping`,\n`Cannot coerce`, or `Category=\"DYNAMICFRAME\"`.\n\n**Failing probe:**\n\n```bash\naws glue get-table --database-name analytics_prod \\\n  --name sales_raw --output json | jq '.Table.StorageDescriptor.Columns'\n```\n\n| Symptom | Root cause | Fix |\n|---|---|---|\n| `ResolveChoice` throws `CONFlict` | Multiple types across partitions | `resolve_choice(spec=...)` with explicit `cast:double` before joins. |\n| `apply_mapping` fails on missing column | Schema drifted | Re-crawl; or `from_catalog(additional_options={\"useCatalogSchema\": False})`. |\n| `Cannot coerce type string to int` | Mixed types | Cast via `to_number` in Spark SQL; or `DynamicFrame.unnest()`. |\n| `DropField` errors on nested struct | Path doesn't match | Inspect actual nested path with `printSchema()`. |\n| Joins produce unexpected nulls | `ResolveChoice` not called before join | `resolve_choice` on both sides before `join`. |\n| `SparkSession` vs `GlueContext` mismatch | Glue 4.0 stricter | Use `DynamicFrame` for catalog reads; convert to DF only when needed. |\n\n**Passing probes:** script ran unchanged on prior successful runs; if\nso, the source schema changed (crawler drift).\n\n### Step 8: AWS-side incident escalation\n\nIf AWS Health shows an active Glue incident in the job's region during\nthe run window, emit ESCALATE with the AWS Health event ARN. Do NOT\ncontinue diagnosing script-level causes when the platform is degraded.\n\n```bash\naws health describe-events \\\n  --filter eventStatusCodes=OPEN,services=GLUE \\\n  --region us-east-1 --output json\n```\n\n### Step 9: Final verdict\n\n- If a single category's failing probe produced positive evidence,\n  emit **ROOT_CAUSE_FOUND** with that CATEGORY.\n- If two categories overlap (e.g., SCRIPT_EXCEPTION with underlying\n  SPARK_OOM), pick the **most-specific** category (SPARK_OOM) and note\n  the script layer in EVIDENCE.\n- If a probe requires operator input (Spark UI not enabled, log group\n  missing), emit **NEED_MORE_INFO** with the data gap.\n- If AWS Health shows an active Glue incident, emit **ESCALATE**.\n\n## Output format — worked examples\n\n### Worked example — script exception\n\n```text\nTARGET: nightly-sales-aggregation\u002Fjr_abc123def456\nVERDICT: ROOT_CAUSE_FOUND\nREASON: CloudWatch Logs for the run contain an AttributeError on\n  line 47 of the script — from_catalog returned None when the table\n  was empty. ExecutionTime was 42s.\nCATEGORY: SCRIPT_EXCEPTION\nEVIDENCE:\n  - State=FAILED, ExecutionTime=42, ErrorMessage=\"No ErrorReason\"\n  - Failing probe:\n    aws logs filter-log-events --log-group-name \u002Faws-glue\u002Fjobs\u002Foutput\n      --log-stream-name jr_abc123def456 --filter-pattern \"Traceback\"\n    → AttributeError: 'NoneType' object has no attribute '_jvc'\n      at line 47 (df.withColumn('revenue', col('price')*col('qty')))\n  - Passing probes: ExecutionTime=42 \u003C Timeout=60 (not TIMEOUT_*);\n    no 'Connection refused' (not JDBC_VPC); no YARN kill (not OOM)\nREMEDIATION:\n  1. Re-crawl to confirm data is present in analytics_prod.sales_raw:\n     aws glue start-crawler --name sales-raw-crawler\n  2. Add a None guard in the script before line 47:\n     if df is None or df.rdd.isEmpty():\n         logger.warning(\"source empty; skipping\")\n         return\n     df = df.withColumn(\"revenue\", col(\"price\") * col(\"qty\"))\n  3. Re-run with bookmark=enable to skip processed partitions:\n     aws glue start-job-run --job-name nightly-sales-aggregation \\\n       --arguments '{\"--job-bookmark-option\":\"enable\"}'\n```\n\n### Worked example — JDBC VPC security group\n\nFull JDBC VPC security-group example moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n### Worked example — bookmark stall\n\nFull bookmark-stall example moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n### Worked example — Spark OOM with data skew\n\nFull Spark OOM data-skew example moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n### Worked example — NEED_MORE_INFO\n\nFull NEED_MORE_INFO example moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n## Anti-Patterns — NEVER do these things\n\n- **NEVER recommend raising `NumberOfWorkers` to fix an OOM without\n  checking the Spark UI skew ratio.** DPU-scale rarely fixes data skew;\n  the hot key stays hot. Check `max\u002Fmedian task bytes`; if > 10x, skew\n  is the cause and salting is the fix.\n- **NEVER recommend `reset-job-bookmark` as a first response to\n  reprocessing complaints.** Reset discards the marker and forces a\n  one-time full reprocess. First inspect the existing bookmark; reset\n  only when the source layout actually changed.\n- **NEVER assume a Glue JDBC connection failure is a Glue bug.** Glue's\n  ENI is the network interface; the database SG ingress is the most\n  common cause. Verify SG, subnet route, and self-referencing rule\n  before opening an AWS Support ticket.\n- **NEVER upgrade a Glue 2.0 job to 3.0 \u002F 4.0 in production without\n  running it in dev first.** The Spark version change (2.4 → 3.1 → 3.3)\n  tightens SQL strictness, changes the date\u002Ftime calendar, and may\n  break PyArrow\u002Fpandas UDFs.\n- **NEVER diagnose \"table not found\" without checking the database name\n  and IAM role permissions.** `EntityNotFoundException` fires identically\n  when the table doesn't exist AND when the role lacks `glue:GetTable`.\n- NEVER cancel a long-running RUNNING job without first checking the\n  Spark UI for genuine stuckness vs normal progress. Cancelling wastes\n  all work and obscures diagnostic data.\n- NEVER edit the script and re-run without reproducing the failure in\n  dev. The fix-and-pray loop on prod data masks whether the fix worked.\n- NEVER rely solely on `ErrorMessage`. Glue's control plane summary is\n  frequently `No ErrorReason` even when the script threw. Always check\n  CloudWatch Logs.\n- NEVER recommend `G.2X` as a blanket OOM fix. `G.2X` doubles cost per\n  DPU; if the OOM is skew, the fix is salting (free).\n- NEVER skip the IAM permission check when diagnosing Data Catalog\n  errors. The role MUST have `glue:GetTable`, `glue:GetPartition(s)`,\n  `glue:GetDatabase`, and (Lake Formation) the LF `DESCRIBE` grant.\n\n## Quick navigation\n\n| You want to... | Jump to |\n|---|---|\n| Diagnose a Python traceback | Step 1 — Script exception |\n| Diagnose a job that ran to Timeout | Step 2 — Job timeout |\n| Diagnose a JDBC connection failure | Step 3 — JDBC connection |\n| Diagnose reprocessing data | Step 4 — Bookmark stall |\n| Diagnose \"table not found\" | Step 5 — Data Catalog |\n| Diagnose Spark OOM \u002F skew | Step 6 — Spark errors |\n| Diagnose ResolveChoice errors | Step 7 — DynamicFrame |\n| Handle missing logs \u002F Spark UI | Pre-flight data gate |\n| Handle AWS Health incident | Step 8 — Escalate |\n| Look up Glue version \u002F worker types | references\u002Fglue-runtime-reference.md |\n\n## Expert heuristic — the 60-second triage\n\n60-second triage heuristic moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n## Pre-flight safety checks (run before any remediation CLI)\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing operation\n  (`start-job-run`, `update-job`, `reset-job-bookmark`, `start-crawler`,\n  `authorize-security-group-ingress`), emit and await operator approval.\n  Never auto-execute remediation.\n- **Never `reset-job-bookmark` in production without flagging the\n  one-time full reprocess.** Confirm the operator understands the cost.\n- **Never `update-job` to change `GlueVersion` outside a dev window.**\n  Glue version changes are non-reversible in the job's history.\n- **Never modify a security group without recording the prior rule set:**\n  ```bash\n  aws ec2 describe-security-groups --group-ids $SG_ID \\\n    --output json > sg-backup-$(date +%s).json\n  ```\n- **One category per maintenance window.** Script changes, SG changes,\n  and bookmark resets each alter the failure surface; stacking them\n  obscures which fix produced the recovery.\n- **Bulk operation safety limit.** When diagnosing a fleet of failing\n  jobs, slice into batches of at most 3 jobs; emit per-job REMEDIATION\n  and a single CONFIRM per batch; verify each batch before proceeding.\n  Never emit remediation CLI for more than 3 jobs in one output block.\n\n## Verdict semantics\n\n| Verdict | When to emit | Position in workflow |\n|---|---|---|\n| `ROOT_CAUSE_FOUND` | A failing probe produced positive evidence for one category. | Primary — terminal for actionable findings. |\n| `NEED_MORE_INFO` | A required probe is unavailable (no logs, no Spark UI, run still RUNNING). | Pre-decision — emit with the specific data gap. |\n| `ESCALATE` | AWS Health shows an active Glue incident in the region during the run. | Pre-decision — surface event ARN; do NOT diagnose script-level causes. |\n\n## Recent AWS features (2024-2026)\n\nRecent AWS feature notes moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n## References (load on demand)\n\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — secondary worked examples (JDBC VPC SG, bookmark stall, Spark OOM skew, NEED_MORE_INFO).\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — Step 0 non-obvious behaviours, the 60-second triage heuristic, recent AWS features.\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — pre-flight data-gate CLI and per-step probe commands (Steps 1, 3, 6).\n- [references\u002Fglue-runtime-reference.md](references\u002Fglue-runtime-reference.md) — Glue version \u002F worker type \u002F runtime mapping.\n\n## Domain\n\nAWS CloudOps \u002F Analytics — Glue ETL job failure diagnosis.\n\n## AWS documentation\n\n- **AWS Glue Developer Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Fwhat-is-glue.html\n- **Glue job bookmarks** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Fmonitor-continuations.html\n- **Glue Spark UI** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Fmonitor-spark-ui.html\n- **Glue connection (JDBC) properties** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Fsetup-connection.html\n- **Glue worker types** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Fadd-job.html\n- **Glue Continuous Logging** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Fcontinuous-logging.html\n- **Glue Data Catalog** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Fpopulate-data-catalog.html\n- **Glue version upgrades** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Frelease-upgrade-glue-30-to-40.html\n- **AWS Health** — https:\u002F\u002Fhealth.aws.amazon.com\u002Fhealth\u002Fstatus\n","# Glue Job Troubleshooter\n\n## What this skill does\n\nDiagnoses AWS Glue ETL job failures by walking a seven-category decision\ntree that maps the observed symptom (job FAILED, TIMEOUT, RUNNING too\nlong, or reprocessing bookmarked data) to a specific root cause with\npositive evidence. The skill is verdict-driven: it never emits a fix\nwithout first producing the failing probe that confirms the cause.\n\n## STRICT output contract\n\nEvery invocation MUST emit exactly one diagnostic block per job run\nin this shape — no prose before, no commentary after:\n\n```text\nTARGET: \u003Cjob-name>\u002F\u003Crun-id> or \u003Cjob-name> if RunId unknown\nVERDICT: ROOT_CAUSE_FOUND | NEED_MORE_INFO | ESCALATE\nREASON: \u003C1-2 sentences naming the failing category and the probe>\nCATEGORY: SCRIPT_EXCEPTION | TIMEOUT_DPU | TIMEOUT_SKEW |\n          JDBC_VPC | JDBC_CRED | BOOKMARK_STALL | CATALOG_MISSING |\n          CATALOG_PARTITION | SPARK_OOM | SPARK_STAGE |\n          DYNAMICFRAME_SCHEMA | DYNAMICFRAME_TYPE | UNKNOWN\nEVIDENCE:\n  - \u003Cobserved symptom — ErrorMessage, state, duration>\n  - \u003Cfailing probe — command and output that confirms the cause>\n  - \u003Cpassing probes — categories ruled out>\nREMEDIATION:\n  1. \u003Cspecific action with CLI command>\n  2. \u003Cverification command after the fix>\n```\n\nA block missing VERDICT, CATEGORY, EVIDENCE, or REMEDIATION is a\ncontract violation — re-emit the full block. NEVER combine multiple job\nruns in a single block; one run per block.\n\n## Quick start\n\n- **Start with `get-job-run` — not the script.** ErrorMessage and\n  ExecutionTime narrow the category before you open the script. A short\n  ExecutionTime with a Python traceback points to SCRIPT_EXCEPTION; a\n  timeout at the configured Timeout minutes points to TIMEOUT_*; a long\n  run with no traceback points to skew or DPU starvation.\n- **Bookmark problems hide in `get-job-bookmark`.** If a job that should\n  skip old data is reprocessing it, the bookmark is stale, missing, or\n  tracking the wrong partition column. The bookmark is per-job.\n- **JDBC failures are almost never Glue.** They are VPC security group,\n  subnet route table, or self-referencing rule problems on the Glue\n  connection. Verify connection SG, database SG, and route table before\n  assuming a Glue bug.\n- **Spark OOM is a skew or shuffling problem, not a memory problem.**\n  Throwing more DPU at an OOM rarely fixes it; the fix is salting the\n  skewed key, repartitioning before a wide transform, or moving to\n  `G.2X` only if the executor genuinely needs more heap.\n- **Glue version matters.** 2.0 = Spark 2.4 \u002F Python 3.7; 3.0 = Spark\n  3.1 \u002F Python 3.9; 4.0 = Spark 3.3 \u002F Python 3.10. A script that ran on\n  2.0 may fail on 4.0 because of Spark SQL strictness, PyArrow\n  incompatibility, or removed DataFrameWriter options.\n\n## Mindset\n\nA Glue job run is a Spark application wrapped in an AWS-managed control\nplane. Most failures are not Glue bugs — they are configuration drift\nbetween the job, the Data Catalog, the VPC, and the source data. The\nskill's job is to find the layer that drifted. The fastest path to root\ncause is to read `get-job-run` first, then narrow to the category that\nmatches the symptom signature, then run the category-specific probe\nbefore opening the script.\n\n## Quick reference — verdict thresholds\n\n| Observation | Verdict | Category |\n|---|---|---|\n| `ErrorMessage` contains Python `Traceback` | **ROOT_CAUSE_FOUND** | SCRIPT_EXCEPTION |\n| `ExecutionTime` == `Timeout`, no traceback | **ROOT_CAUSE_FOUND** | TIMEOUT_DPU \u002F TIMEOUT_SKEW |\n| Spark UI: one task reads 100x median bytes | **ROOT_CAUSE_FOUND** | TIMEOUT_SKEW |\n| `ErrorMessage` mentions `Connection refused` \u002F `VPC` | **ROOT_CAUSE_FOUND** | JDBC_VPC |\n| `ErrorMessage` mentions `Access denied` \u002F `auth failed` | **ROOT_CAUSE_FOUND** | JDBC_CRED |\n| Source grew but `get-job-bookmark` shows old marker | **ROOT_CAUSE_FOUND** | BOOKMARK_STALL |\n| `EntityNotFoundException: Table not found` | **ROOT_CAUSE_FOUND** | CATALOG_MISSING |\n| `ErrorMessage` mentions `partition` + `not found` | **ROOT_CAUSE_FOUND** | CATALOG_PARTITION |\n| Spark UI executor: `OOM` \u002F `Container killed by YARN` | **ROOT_CAUSE_FOUND** | SPARK_OOM |\n| Spark UI: failed stage with one slow task | **ROOT_CAUSE_FOUND** | SPARK_STAGE \u002F TIMEOUT_SKEW |\n| `ResolveChoice` \u002F `apply_mapping` schema errors | **ROOT_CAUSE_FOUND** | DYNAMICFRAME_SCHEMA |\n| `ExecutionTime` long but job succeeded, no probe run | **NEED_MORE_INFO** | (need Spark UI) |\n| AWS Health event for Glue in region | **ESCALATE** | (AWS-side incident) |\n\n## Pre-flight: data gate (run before any diagnosis)\n\nGlue diagnosis requires three data sources: job-run metadata (state,\nErrorMessage, ExecutionTime, configuration), CloudWatch Logs excerpt for\nthe failing run, and — for performance\u002Fskew diagnoses — the Spark UI\nevent log exported to S3.\n\nData-gate CLI (get-job-run, get-job-runs, CloudWatch Logs, bookmark state, Spark UI event log) moved to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n### Data-quality short-circuits\n\n| Condition | Effect on diagnosis |\n|---|---|\n| `get-job-run` returns `RunId not found` | Job never started under that id; verify via `get-job-runs`. |\n| `ErrorMessage` is `No ErrorReason` but `State=FAILED` | Need CloudWatch Logs to surface the exception. Emit NEED_MORE_INFO with the log-fetch step. |\n| CloudWatch log group missing | Logging disabled (`--enable-continuous-cloudwatch-log false`). Cannot diagnose script-level failures. NEED_MORE_INFO. |\n| Spark UI not enabled | Cannot diagnose skew \u002F OOM \u002F stage failures with evidence. NEED_MORE_INFO; recommend `--enable-spark-ui` and `--spark-event-logs-path` for future runs. |\n| `get-job-bookmark` returns `{}` | Bookmark reset or never written. Reprocessing is expected, not a bug. |\n| Job still `RUNNING` (not FAILED) | Diagnose as TIMEOUT_* candidate; do NOT wait for failure if past SLA. |\n\nWhen `ExecutionTime` and CloudWatch Logs disagree, trust CloudWatch for\nthe failure moment and `get-job-run` for overall duration. The\nExecutionTime counts the control-plane wrapper; the Spark application\nmay have failed earlier.\n\n## Process — Diagnostic decision tree (apply in order)\n\n### Step 0: Non-obvious behaviours that change the diagnosis\n\nStep 0 non-obvious behaviours moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n### Step 1: Job failure (Python script exceptions)\n\n**Signature:** `ErrorMessage` contains `Traceback`, OR short\n`ExecutionTime` (\u003C 5 min) with `State=FAILED`.\n\n**Failing probe:** CloudWatch Logs for the run, filtered to `Traceback`.\n\nProbe: [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — Step 1 Traceback log filter.\n\n| Exception in trace | Root cause | Fix |\n|---|---|---|\n| `KeyError: '\u003Ccolumn>'` | Schema changed since last crawl | Re-crawl; or fix script to tolerate missing column. |\n| `AttributeError: 'NoneType'...` | DataFrame API on None (read returned empty) | Check source S3 path; check partition filter. |\n| `ImportError: No module named '\u003Cpkg>'` | External Python package not installed | Add `--additional-python-modules` (Glue 3.0+). |\n| `AnalysisException: Path does not exist` | S3 source path wrong or empty | Verify `s3:\u002F\u002F` prefix; check source crawler. |\n| `SparkUpgradeException` (date parsing) | Glue version calendar change | `--conf spark.sql.legacy.timeParserPolicy=LEGACY`. |\n| `Py4JJavaError` (wrapping Java) | Spark internal — read nested cause | Surface nested Java stack; route to Step 6. |\n| `AnalysisException: cannot resolve '\u003Ccol>'` | Typo or case-sensitivity | Glue 4.0 is case-sensitive; quote column names. |\n\n**Passing probes:** `ExecutionTime \u003C Timeout` (not timeout category); no\n\"Connection refused\" (not JDBC); no YARN kill (not OOM).\n\n### Step 2: Job timeout (DPU capacity vs long-running transform)\n\n**Signature:** `ExecutionTime` == `Timeout` (±1 min), `State=TIMEOUT`\nor `FAILED`, no Python traceback.\n\n**Failing probe:** compare duration to `Timeout`; pull Spark UI stage\nsummary for task progression.\n\n```bash\njq '{state: .JobRun.State, exec: .JobRun.ExecutionTime,\n     timeout: .JobRun.Timeout, workers: .JobRun.NumberOfWorkers,\n     workerType: .JobRun.WorkerType}' job-run.json\n```\n\n| Observation | Root cause | Fix |\n|---|---|---|\n| All tasks slow; `NumberOfWorkers` \u003C 5 | DPU-starved | Raise `NumberOfWorkers` (min 5 for prod ETL). |\n| One task running 50x median | Data skew | Salt the skewed key; repartition before wide transform. |\n| Many tasks stuck on S3 `LIST`\u002F`HEAD` | Too many small files | Compact source; `--conf spark.sql.sources.partitionOverwriteMode=dynamic`. |\n| `from_catalog` slow, no partition pushdown | Full scan | Pass `push_down_predicate='year=2025 and month>=01'`. |\n| JDBC read, no partition column | Single-threaded JDBC | Add `hashfield` \u002F `hashexpression` predicate. |\n| `G.1X`, executor heap exhausted | Heap pressure | Move to `G.2X` or tune `--executor-memory`. |\n| Long-running Python UDF in `map`\u002F`flatMap` | UDF serial bottleneck | Replace with native Spark SQL; broadcast hot data. |\n\n### Step 3: JDBC connection errors (VPC, subnet, security group)\n\n**Signature:** `ErrorMessage` mentions `Connection refused`, `timed\nout`, `VPC configuration`, `Network interface`, `ENI`, or `Could not\nconnect`.\n\n**Failing probe:** verify Glue connection's SG, subnet route table, and\nthe database SG ingress.\n\nProbe: [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — Step 3 connection SG \u002F subnet \u002F DB SG \u002F route table.\n\n| Missing config | Symptom | Fix |\n|---|---|---|\n| DB SG lacks ingress from Glue SG on db port (5432\u002F3306) | `Connection refused` \u002F `timed out` | Add inbound: source = Glue SG, port = db port. |\n| Glue SG lacks egress to DB | `timed out` (egress blocked) | Add outbound: dest = DB SG \u002F CIDR, port = db port. |\n| Glue SG lacks self-referencing rule | Intermittent ENI setup fails | Add inbound: source = Glue SG itself, all ports. |\n| Subnet route table missing path to DB subnet | `timed out` | Add route via TGW \u002F peering \u002F LPG. |\n| Glue subnet in different AZ than single-AZ DB | `Connection refused` | Use a Glue connection subnet in the DB's AZ. |\n| NACL stateful mismatch | Intermittent | NACLs are stateless; check in+out on both subnets. |\n| Glue connection points to deleted subnet | ENI provisioning fails | Recreate connection with current subnet. |\n\n**Passing probes:** run `nc -vz \u003Cdb-host> \u003Cport>` from a Glue dev\nendpoint or EC2 in the same subnet. If `nc` succeeds, the path is clear\nand the issue is authentication — route to Step \"JDBC credentials\"\n(JDBC_CRED) and check the connection's JDBC URL \u002F Secrets Manager\nreference.\n\n### Step 4: Job bookmark errors (not advancing, reprocessing data)\n\n**Signature:** source S3 prefix grew, but job reprocesses files already\nrun. `get-job-bookmark` shows old or empty marker.\n\n**Failing probe:**\n\n```bash\naws glue get-job-bookmark --job-name nightly-sales-aggregation \\\n  --run-id $RUN_ID --output json\n# Inspect: bookmark[\"JobBookmarks\"][\"Attempt\"],\n# \"Args\" \u002F \"Paths\" \u002F \"partitionKeys\" structure\n```\n\n| Bookmark observation | Root cause | Fix |\n|---|---|---|\n| Returns `{}` | Bookmark disabled or reset | `--job-bookmark-option=enable`; or accept reprocess if disabled intentionally. |\n| `partitionKeys` present but source path layout changed | Layout drift | `reset-job-bookmark`; update `partitionKeys` in script. |\n| `Attempt` count > 1 across runs | Bookmark write failing | Add `glue:UpdateJobBookmark` to job role. |\n| Source has nested partitions not in `partitionKeys` | Job reads all sub-partitions | Recrawl; update `partitionKeys`. |\n| Same S3 key reprocessed | File overwritten in place | Glue bookmarks by key — overwritten files always reprocess. Design for appends. |\n| KMS-encrypted bookmark fails to read | Role lacks `kms:Decrypt` on bookmark CMK | Add KMS decrypt to job role. |\n| Glue 2.0 → 3.0+ upgrade, bookmark unreadable | Bookmark schema changed | `reset-job-bookmark` once post-upgrade; accept one reprocess. |\n\n**Passing probes:** IAM policy simulator on the job's role for\n`glue:GetJobBookmark` and `glue:UpdateJobBookmark`. Both MUST be Allow.\n\n### Step 5: Data Catalog errors (table \u002F partition not found)\n\n**Signature:** `ErrorMessage` mentions `EntityNotFoundException`,\n`Table not found`, `Database not found`, or `Partition not found`.\n\n**Failing probe:**\n\n```bash\naws glue get-table --database-name analytics_prod \\\n  --name sales_raw --output json\naws glue get-partitions --database-name analytics_prod \\\n  --table-name sales_raw --output json\naws glue get-database --name analytics_prod --output json\n```\n\n| Probe result | Root cause | Fix |\n|---|---|---|\n| `get-table` returns `EntityNotFoundException` | Table missing | Re-run crawler; or fix job table name. |\n| Table exists but in a different database | Wrong `database_name` | Fix script; database name is case-sensitive. |\n| `get-partitions` empty | Crawler never ran on partitions | Re-crawl; or `MSCK REPAIR TABLE` via Athena. |\n| Partition exists but job can't see it | Role lacks `glue:GetPartition` | Add `glue:GetPartition(s)` to job role. |\n| `from_catalog` with stale schema | Catalog schema != S3 data | Re-crawl; or `additional_options={\"useCatalogSchema\": False}`. |\n| Cross-account catalog access | Role lacks cross-account `glue:*` | Add resource-account IAM; use catalog ARN. |\n| Lake Formation tag blocks read | LF `DESCRIBE` missing | Grant LF `DESCRIBE` on table to job role. |\n\n### Step 6: Spark errors (executor OOM, stage failures, data skew)\n\n**Signature:** `ErrorMessage` mentions `OutOfMemoryError`, `Container\nkilled by YARN`, `Java heap space`, `GC overhead limit`, or stage\nfailure with `Lost task` retries.\n\n**Failing probe:** Spark UI event log — identify the failed stage, task\nattempt counts, and executor memory metrics.\n\nProbe: [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — Step 6 Spark UI event log retrieval.\n\n| Spark symptom | Root cause | Fix |\n|---|---|---|\n| One task reads 100x median bytes | Data skew | Salt the skewed key: `df.withColumn(\"salt\", (rand()*10).cast(\"int\"))`. |\n| `Container killed by YARN...memory limits` | Executor OOM | `G.1X` → `G.2X`; or reduce `spark.sql.shuffle.partitions` default. |\n| Stage retries exhausted (4 attempts) | Speculative task failures | Inspect task stack; often OOM or bad input row. |\n| `GC overhead limit exceeded` | Many small objects \u002F UDF churn | Replace PyRDD UDFs with Spark SQL; broadcast small DFs. |\n| Long pause before stage starts | Shuffle write bottleneck | Raise `spark.sql.shuffle.partitions` (200 → 1000+ for TB). |\n| Broadcast join OOM | Broadcast hash table too large | Lower `spark.sql.autoBroadcastJoinThreshold` (default 10 MB). |\n| Python worker OOM (`map`\u002F`flatMap`) | UDF returning huge objects | Paginate; or `applyInPandas` with chunking. |\n\n**Passing probes:** source volume consistent with previous successful\nruns; if so, skew is the new factor.\n\n### Step 7: DynamicFrame errors (schema mismatch, type coercion)\n\n**Signature:** log mentions `ResolveChoice`, `apply_mapping`,\n`Cannot coerce`, or `Category=\"DYNAMICFRAME\"`.\n\n**Failing probe:**\n\n```bash\naws glue get-table --database-name analytics_prod \\\n  --name sales_raw --output json | jq '.Table.StorageDescriptor.Columns'\n```\n\n| Symptom | Root cause | Fix |\n|---|---|---|\n| `ResolveChoice` throws `CONFlict` | Multiple types across partitions | `resolve_choice(spec=...)` with explicit `cast:double` before joins. |\n| `apply_mapping` fails on missing column | Schema drifted | Re-crawl; or `from_catalog(additional_options={\"useCatalogSchema\": False})`. |\n| `Cannot coerce type string to int` | Mixed types | Cast via `to_number` in Spark SQL; or `DynamicFrame.unnest()`. |\n| `DropField` errors on nested struct | Path doesn't match | Inspect actual nested path with `printSchema()`. |\n| Joins produce unexpected nulls | `ResolveChoice` not called before join | `resolve_choice` on both sides before `join`. |\n| `SparkSession` vs `GlueContext` mismatch | Glue 4.0 stricter | Use `DynamicFrame` for catalog reads; convert to DF only when needed. |\n\n**Passing probes:** script ran unchanged on prior successful runs; if\nso, the source schema changed (crawler drift).\n\n### Step 8: AWS-side incident escalation\n\nIf AWS Health shows an active Glue incident in the job's region during\nthe run window, emit ESCALATE with the AWS Health event ARN. Do NOT\ncontinue diagnosing script-level causes when the platform is degraded.\n\n```bash\naws health describe-events \\\n  --filter eventStatusCodes=OPEN,services=GLUE \\\n  --region us-east-1 --output json\n```\n\n### Step 9: Final verdict\n\n- If a single category's failing probe produced positive evidence,\n  emit **ROOT_CAUSE_FOUND** with that CATEGORY.\n- If two categories overlap (e.g., SCRIPT_EXCEPTION with underlying\n  SPARK_OOM), pick the **most-specific** category (SPARK_OOM) and note\n  the script layer in EVIDENCE.\n- If a probe requires operator input (Spark UI not enabled, log group\n  missing), emit **NEED_MORE_INFO** with the data gap.\n- If AWS Health shows an active Glue incident, emit **ESCALATE**.\n\n## Output format — worked examples\n\n### Worked example — script exception\n\n```text\nTARGET: nightly-sales-aggregation\u002Fjr_abc123def456\nVERDICT: ROOT_CAUSE_FOUND\nREASON: CloudWatch Logs for the run contain an AttributeError on\n  line 47 of the script — from_catalog returned None when the table\n  was empty. ExecutionTime was 42s.\nCATEGORY: SCRIPT_EXCEPTION\nEVIDENCE:\n  - State=FAILED, ExecutionTime=42, ErrorMessage=\"No ErrorReason\"\n  - Failing probe:\n    aws logs filter-log-events --log-group-name \u002Faws-glue\u002Fjobs\u002Foutput\n      --log-stream-name jr_abc123def456 --filter-pattern \"Traceback\"\n    → AttributeError: 'NoneType' object has no attribute '_jvc'\n      at line 47 (df.withColumn('revenue', col('price')*col('qty')))\n  - Passing probes: ExecutionTime=42 \u003C Timeout=60 (not TIMEOUT_*);\n    no 'Connection refused' (not JDBC_VPC); no YARN kill (not OOM)\nREMEDIATION:\n  1. Re-crawl to confirm data is present in analytics_prod.sales_raw:\n     aws glue start-crawler --name sales-raw-crawler\n  2. Add a None guard in the script before line 47:\n     if df is None or df.rdd.isEmpty():\n         logger.warning(\"source empty; skipping\")\n         return\n     df = df.withColumn(\"revenue\", col(\"price\") * col(\"qty\"))\n  3. Re-run with bookmark=enable to skip processed partitions:\n     aws glue start-job-run --job-name nightly-sales-aggregation \\\n       --arguments '{\"--job-bookmark-option\":\"enable\"}'\n```\n\n### Worked example — JDBC VPC security group\n\nFull JDBC VPC security-group example moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n### Worked example — bookmark stall\n\nFull bookmark-stall example moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n### Worked example — Spark OOM with data skew\n\nFull Spark OOM data-skew example moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n### Worked example — NEED_MORE_INFO\n\nFull NEED_MORE_INFO example moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n## Anti-Patterns — NEVER do these things\n\n- **NEVER recommend raising `NumberOfWorkers` to fix an OOM without\n  checking the Spark UI skew ratio.** DPU-scale rarely fixes data skew;\n  the hot key stays hot. Check `max\u002Fmedian task bytes`; if > 10x, skew\n  is the cause and salting is the fix.\n- **NEVER recommend `reset-job-bookmark` as a first response to\n  reprocessing complaints.** Reset discards the marker and forces a\n  one-time full reprocess. First inspect the existing bookmark; reset\n  only when the source layout actually changed.\n- **NEVER assume a Glue JDBC connection failure is a Glue bug.** Glue's\n  ENI is the network interface; the database SG ingress is the most\n  common cause. Verify SG, subnet route, and self-referencing rule\n  before opening an AWS Support ticket.\n- **NEVER upgrade a Glue 2.0 job to 3.0 \u002F 4.0 in production without\n  running it in dev first.** The Spark version change (2.4 → 3.1 → 3.3)\n  tightens SQL strictness, changes the date\u002Ftime calendar, and may\n  break PyArrow\u002Fpandas UDFs.\n- **NEVER diagnose \"table not found\" without checking the database name\n  and IAM role permissions.** `EntityNotFoundException` fires identically\n  when the table doesn't exist AND when the role lacks `glue:GetTable`.\n- NEVER cancel a long-running RUNNING job without first checking the\n  Spark UI for genuine stuckness vs normal progress. Cancelling wastes\n  all work and obscures diagnostic data.\n- NEVER edit the script and re-run without reproducing the failure in\n  dev. The fix-and-pray loop on prod data masks whether the fix worked.\n- NEVER rely solely on `ErrorMessage`. Glue's control plane summary is\n  frequently `No ErrorReason` even when the script threw. Always check\n  CloudWatch Logs.\n- NEVER recommend `G.2X` as a blanket OOM fix. `G.2X` doubles cost per\n  DPU; if the OOM is skew, the fix is salting (free).\n- NEVER skip the IAM permission check when diagnosing Data Catalog\n  errors. The role MUST have `glue:GetTable`, `glue:GetPartition(s)`,\n  `glue:GetDatabase`, and (Lake Formation) the LF `DESCRIBE` grant.\n\n## Quick navigation\n\n| You want to... | Jump to |\n|---|---|\n| Diagnose a Python traceback | Step 1 — Script exception |\n| Diagnose a job that ran to Timeout | Step 2 — Job timeout |\n| Diagnose a JDBC connection failure | Step 3 — JDBC connection |\n| Diagnose reprocessing data | Step 4 — Bookmark stall |\n| Diagnose \"table not found\" | Step 5 — Data Catalog |\n| Diagnose Spark OOM \u002F skew | Step 6 — Spark errors |\n| Diagnose ResolveChoice errors | Step 7 — DynamicFrame |\n| Handle missing logs \u002F Spark UI | Pre-flight data gate |\n| Handle AWS Health incident | Step 8 — Escalate |\n| Look up Glue version \u002F worker types | references\u002Fglue-runtime-reference.md |\n\n## Expert heuristic — the 60-second triage\n\n60-second triage heuristic moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n## Pre-flight safety checks (run before any remediation CLI)\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing operation\n  (`start-job-run`, `update-job`, `reset-job-bookmark`, `start-crawler`,\n  `authorize-security-group-ingress`), emit and await operator approval.\n  Never auto-execute remediation.\n- **Never `reset-job-bookmark` in production without flagging the\n  one-time full reprocess.** Confirm the operator understands the cost.\n- **Never `update-job` to change `GlueVersion` outside a dev window.**\n  Glue version changes are non-reversible in the job's history.\n- **Never modify a security group without recording the prior rule set:**\n  ```bash\n  aws ec2 describe-security-groups --group-ids $SG_ID \\\n    --output json > sg-backup-$(date +%s).json\n  ```\n- **One category per maintenance window.** Script changes, SG changes,\n  and bookmark resets each alter the failure surface; stacking them\n  obscures which fix produced the recovery.\n- **Bulk operation safety limit.** When diagnosing a fleet of failing\n  jobs, slice into batches of at most 3 jobs; emit per-job REMEDIATION\n  and a single CONFIRM per batch; verify each batch before proceeding.\n  Never emit remediation CLI for more than 3 jobs in one output block.\n\n## Verdict semantics\n\n| Verdict | When to emit | Position in workflow |\n|---|---|---|\n| `ROOT_CAUSE_FOUND` | A failing probe produced positive evidence for one category. | Primary — terminal for actionable findings. |\n| `NEED_MORE_INFO` | A required probe is unavailable (no logs, no Spark UI, run still RUNNING). | Pre-decision — emit with the specific data gap. |\n| `ESCALATE` | AWS Health shows an active Glue incident in the region during the run. | Pre-decision — surface event ARN; do NOT diagnose script-level causes. |\n\n## Recent AWS features (2024-2026)\n\nRecent AWS feature notes moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n## References (load on demand)\n\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — secondary worked examples (JDBC VPC SG, bookmark stall, Spark OOM skew, NEED_MORE_INFO).\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — Step 0 non-obvious behaviours, the 60-second triage heuristic, recent AWS features.\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — pre-flight data-gate CLI and per-step probe commands (Steps 1, 3, 6).\n- [references\u002Fglue-runtime-reference.md](references\u002Fglue-runtime-reference.md) — Glue version \u002F worker type \u002F runtime mapping.\n\n## Domain\n\nAWS CloudOps \u002F Analytics — Glue ETL job failure diagnosis.\n\n## AWS documentation\n\n- **AWS Glue Developer Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Fwhat-is-glue.html\n- **Glue job bookmarks** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Fmonitor-continuations.html\n- **Glue Spark UI** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Fmonitor-spark-ui.html\n- **Glue connection (JDBC) properties** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Fsetup-connection.html\n- **Glue worker types** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Fadd-job.html\n- **Glue Continuous Logging** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Fcontinuous-logging.html\n- **Glue Data Catalog** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Fpopulate-data-catalog.html\n- **Glue version upgrades** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Frelease-upgrade-glue-30-to-40.html\n- **AWS Health** — https:\u002F\u002Fhealth.aws.amazon.com\u002Fhealth\u002Fstatus\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":44},{"tags":25,"phase":26,"author":27,"domain":28,"family":29,"version":30,"keywords":31,"task_type":32,"complexity":33,"entry_point":34,"skill_class":35,"when_to_use":36,"requires_llm":37,"verdict_shape":38,"when_not_to_use":39,"lifecycle_status":40,"invocation_schema":41,"supports_pipeline":37,"invocation_example":42,"activation_triggers":43},"glue, analytics, etl, troubleshoot, spark, data-catalog","2","Jacky Chan — AWS Community Builder","aws-cloudops","Analytics","0.1.0","AWS Glue, Glue ETL, Glue job failure, Glue job timeout, Glue bookmark, DynamicFrame, Spark OOM, data skew, JDBC connection, Glue Data Catalog, Glue version 4.0, DPU capacity, Glue Spark UI, CloudWatch logs, Glue connection, crawler, partition pruning, Python shell job, Ray job, Analytics","troubleshoot","high","false","capability","Diagnosing an AWS Glue ETL job that FAILED, hit TIMEOUT, is RUNNING past its expected duration, is reprocessing data the bookmark should have skipped, is throwing Python exceptions, is unable to reach a JDBC source in a VPC, is reporting Spark executor OOM or stage failures, or is surfacing Data Catalog \"table not found\" \u002F \"partition not found\" errors.","true","ROOT_CAUSE_FOUND | NEED_MORE_INFO | ESCALATE","Glue Data Quality rule evaluation (use the Data Quality service directly), AWS Lake Formation permission errors (use Lake Formation admin tooling), Glue Studio notebook interactive development (not a job-run diagnosis), or Glue crawler schema inference tuning (use a crawler classification specialist). This skill diagnoses job-run failures, not data quality or governance.","active","Input: either (a) a Glue JobName + RunId + live-account context, (b) a pasted ErrorMessage from glue:get-job-run, OR (c) a CloudWatch Logs \u002F Spark stage failure excerpt. Output: a deterministic TARGET \u002F VERDICT \u002F REASON \u002F CATEGORY \u002F EVIDENCE \u002F REMEDIATION block per job run, where VERDICT ∈ {ROOT_CAUSE_FOUND, NEED_MORE_INFO, ESCALATE} and CATEGORY ∈ {SCRIPT_EXCEPTION, TIMEOUT_DPU, TIMEOUT_SKEW, JDBC_VPC, JDBC_CRED, BOOKMARK_STALL, CATALOG_MISSING, CATALOG_PARTITION, SPARK_OOM, SPARK_STAGE, DYNAMICFRAME_SCHEMA, DYNAMICFRAME_TYPE, UNKNOWN}.","# Minimal valid input (offline classification from ErrorMessage):\nJobName: nightly-sales-aggregation\nRunId: jr_abc123def456\nState: FAILED\nErrorMessage: \"Traceback (most recent call last):\n  File \\\"tmp\u002Fscript.py\\\", line 47, in \u003Cmodule>\n    df = df.withColumn('revenue', col('price') * col('qty'))\n  ... AttributeError: 'NoneType' object has no attribute '_jvc'\"\nExecutionTime: 42\nGlueVersion: 4.0\nWorkerType: G.1X\nNumberOfWorkers: 5\nEmit the standard diagnostic block (TARGET, VERDICT, REASON,\nCATEGORY, EVIDENCE, REMEDIATION).","Glue job failed, Glue job timeout, Glue bookmark not advancing, Glue reprocessing data, Glue JDBC connection error, Glue Spark OOM, Glue stage failure, Glue table not found, Glue partition not found, DynamicFrame schema mismatch, Glue DPU capacity, Glue job RUNNING too long, Glue version 2.0 vs 3.0 vs 4.0, diagnose Glue ETL failure, Spark UI Glue","Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). Offline classification works from a pasted job-run ErrorMessage, CloudWatch Logs excerpt, or Spark stage failure summary. Live-account diagnosis uses aws glue get-job-run, get-job-runs, get-job-bookmark, get-connection, aws logs filter-log-events on \u002Faws-glue\u002Fjobs, aws s3 cp for Spark UI event logs, aws glue get-table and get-partitions for catalog validation, and aws ec2 describe-security-groups \u002F...","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Fglue-job-troubleshooter",0,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills","https:\u002F\u002Fgithub.com\u002Fjhkchan","CTO & Co-Founder @Beever-AI  & @votee. CAISP. AWS Community Builder. Organizer@GDGCloudHK. MongoDB Champion. Technopreneur + Infornographer.","2026-09-24 08:54:10",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add jhkchan\u002Faws-agent-skills --skill glue-job-troubleshooter",{"tool":59,"command":60},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill glue-job-troubleshooter",{"tool":62,"command":63},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill glue-job-troubleshooter","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002FSKILL.md",true,[67,73,77,81,85,89,93,97,101,105,109,113,117,121,125,129,133,137,141],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",8610,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Feval\u002Ftest-cases.yaml",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"evals\u002Fbaselines\u002Fbookmark-not-advancing-layout-drift.md",665,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Fevals\u002Fbaselines\u002Fbookmark-not-advancing-layout-drift.md",{"path":78,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":79,"sourceHtmlUrl":80},"evals\u002Fbaselines\u002Fcatalog-table-not-found.md",761,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Fevals\u002Fbaselines\u002Fcatalog-table-not-found.md",{"path":82,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":83,"sourceHtmlUrl":84},"evals\u002Fbaselines\u002Fjdbc-connection-missing-security-group.md",715,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Fevals\u002Fbaselines\u002Fjdbc-connection-missing-security-group.md",{"path":86,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":87,"sourceHtmlUrl":88},"evals\u002Fbaselines\u002Fpython-exception-attributeerror-script.md",693,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Fevals\u002Fbaselines\u002Fpython-exception-attributeerror-script.md",{"path":90,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":91,"sourceHtmlUrl":92},"evals\u002Fbaselines\u002Fspark-oom-stage-skew.md",703,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Fevals\u002Fbaselines\u002Fspark-oom-stage-skew.md",{"path":94,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":95,"sourceHtmlUrl":96},"evals\u002Feval_config.yaml",1843,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Fevals\u002Feval_config.yaml",{"path":98,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":99,"sourceHtmlUrl":100},"evals\u002Fevals.json",4552,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Fevals\u002Fevals.json",{"path":102,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":103,"sourceHtmlUrl":104},"evals\u002Fprompts\u002Fbookmark-not-advancing-layout-drift.md",863,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Fevals\u002Fprompts\u002Fbookmark-not-advancing-layout-drift.md",{"path":106,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":107,"sourceHtmlUrl":108},"evals\u002Fprompts\u002Fcatalog-table-not-found.md",936,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Fevals\u002Fprompts\u002Fcatalog-table-not-found.md",{"path":110,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":111,"sourceHtmlUrl":112},"evals\u002Fprompts\u002Fjdbc-connection-missing-security-group.md",1014,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Fevals\u002Fprompts\u002Fjdbc-connection-missing-security-group.md",{"path":114,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":115,"sourceHtmlUrl":116},"evals\u002Fprompts\u002Fpython-exception-attributeerror-script.md",884,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Fevals\u002Fprompts\u002Fpython-exception-attributeerror-script.md",{"path":118,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":119,"sourceHtmlUrl":120},"evals\u002Fprompts\u002Fspark-oom-stage-skew.md",752,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Fevals\u002Fprompts\u002Fspark-oom-stage-skew.md",{"path":122,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":123,"sourceHtmlUrl":124},"examples\u002FREADME.md",7629,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Fexamples\u002FREADME.md",{"path":126,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":127,"sourceHtmlUrl":128},"references\u002Fadvanced-patterns.md",4637,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Freferences\u002Fadvanced-patterns.md",{"path":130,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":131,"sourceHtmlUrl":132},"references\u002Fdiagnostic-commands.md",2132,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Freferences\u002Fdiagnostic-commands.md",{"path":134,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":135,"sourceHtmlUrl":136},"references\u002Fglue-runtime-reference.md",11084,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Freferences\u002Fglue-runtime-reference.md",{"path":138,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":139,"sourceHtmlUrl":140},"references\u002Fworked-examples.md",4734,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Freferences\u002Fworked-examples.md",{"path":142,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":143,"sourceHtmlUrl":144},"skill.usf.yaml",4567,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fglue-job-troubleshooter\u002Fskill.usf.yaml",[146,153,160,167,174,181],{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":152,"publishedAt":19},"01M7ADVD60X4PCAPKSE58P9NDC","xray-tracing-deployer","Deploys AWS X-Ray distributed tracing with production-grade configuration: X-Ray daemon deployment (EC2 systemd, ECS sidecar, EKS DaemonSet, Lambda built-in), SDK instrumentation (Java, Python, Node.js, Go, .NET) with annotations and metadata, sampling rules (default reservoir + rate vs custom rules with URL \u002F method \u002F service-name predicates), service map generation, trace query and retrieval, groups and insights, CloudWatch ServiceLens integration, IAM permissions (PutTraceSegments, GetSamplingRules), and latest features (Lambda Powertools tracing, OpenTelemetry \u002F ADOT Collector support, W3C trace context). Emits a READY_TO_DEPLOY checklist with every configuration item verified. Use when enabling X-Ray on a new application, adding tracing to ECS \u002F EKS \u002F Lambda, validating a sampling configuration, or generating daemon deployment CLI and IaC templates. Triggers: X-Ray, distributed tracing, X-Ray daemon, sampling rules, service map, X-Ray SDK, OpenTelemetry, ADOT, Lambda Powertools, CloudWatch ServiceLens.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxray-tracing-deployer\u002FSKILL.md",[],[],{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":19},"01M7ADTVJ7DCBM9CB1FY51GH7J","wellarchitected-workload-auditor","Audits AWS Well-Architected Tool workloads for review staleness, per-pillar high-risk issue counts, milestone tracking gaps, and remediation plan completeness. Emits a deterministic verdict (STALE_REVIEW | HIGH_RISK | CONFIG_GAP | OK) per workload with per-pillar risk breakdown, milestone trend analysis, and specific remediation. Use when reviewing Well-Architected workloads, checking WA review freshness, auditing high-risk issues per pillar, validating milestone coverage, or tracking remediation plans.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-workload-auditor\u002FSKILL.md",[],[],{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":166,"publishedAt":19},"01M7ADT59G6FTTNZYHT2QRPNNP","wellarchitected-review-operator","Operates AWS Well-Architected Tool reviews end-to-end — creates workloads, runs pillar reviews (operational excellence, security, reliability, performance, cost optimization, sustainability, Prosperity), answers questions with risk-tier rationale, generates reports and improvement plans, creates milestones, and integrates with Trusted Advisor and Well-Architected Labs. Runs deterministic pre-checks (workload existence, lens availability, pillar coverage), emits the exact update-answer \u002F get-consolidated-report CLI behind a CONFIRM gate, and verifies risk-tier transitions. Emits READY | BLOCKED | COMPLETED. Use when creating a workload, answering pillar questions, generating an improvement plan, creating a milestone, or integrating with Trusted Advisor. Triggers: well-architected tool, well architected review, workload review, pillar, operational excellence, security, reliability, performance, cost optimization, sustainability, prosperity, improvement plan, milestone, trusted advisor.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-review-operator\u002FSKILL.md",[],[],{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":173,"publishedAt":19},"01M7ADSH5JA9QHNPPHQCD7EVA7","wafv2-web-acl-deployer","Provisions AWS WAFv2 Web ACLs with correct production defaults: scope selection (CLOUDFRONT vs REGIONAL), managed rule groups (AWSManagedRulesCommonRuleSet, SQLiRuleSet, LinuxRuleSet, WindowsRuleSet, IPReputationList, BotControlRuleSet, AmazonIpReputationList, ATP), custom rules (byte match, IP set, regex pattern, geo match, size constraint, rate-based), rule priority ordering, logging destinations (Kinesis Firehose, CloudWatch Logs, S3), resource association (ALB, API Gateway, CloudFront), rate-based rules with aggregate keys (IP, forwarded IP), Challenge and CAPTCHA actions, and account takeover prevention. Emits a READY_TO_DEPLOY checklist. Use when creating a Web ACL, attaching managed rules, configuring rate limiting, enabling WAF logging, associating a Web ACL with an ALB\u002FAPI Gateway\u002FCloudFront, or configuring CAPTCHA\u002FChallenge actions. Triggers: create WAF Web ACL, WAFv2, managed rule groups, WAF rate limiting, WAF logging, WAF CAPTCHA, WAF Challenge action, bot control, ATP managed rules.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-deployer\u002FSKILL.md",[],[],{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":180,"publishedAt":19},"01M7ADRYFAT8R73FBNCHRC573X","wafv2-web-acl-auditor","Audits AWS WAFv2 Web ACL configurations to determine whether the ACL provides effective protection: default-action posture (Allow vs Block), managed-rule-group coverage gaps, rule effectiveness (BLOCK vs COUNT, shadow\u002Fbypass rules, stale exclusions), rate-based rule correctness, logging and visibility configuration, and text-transformation bypass vectors. Emits a deterministic verdict per Web ACL. Use when reviewing a WAFv2 Web ACL for security posture, checking managed-rule coverage, validating rate-limit configuration, auditing WAF logging, or hardening a WAF before production deployment. Triggers: WAF, WAFv2, Web ACL, managed rule group, AWSManagedRules, rate-based rule, CAPTCHA, Challenge, OverrideAction, Count mode, forwarded IP, Bot Control, ATP, text transformation, WAF logging, WAF visibility, OWASP, SQLi, XSS, RFI.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-auditor\u002FSKILL.md",[],[],{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":187,"publishedAt":19},"01M7ADR8W7G72JX4KFGN03QK8Q","waf-rule-deployer","Provisions AWS WAFv2 rule sets with production defaults: Web ACL creation (CloudFront scope in us-east-1 vs Regional scope), rule groups (managed vs custom) with capacity planning in WCU (Web ACL Capacity Units, 1500 default per ACL), managed rule groups (AWSManagedRulesCommonRuleSet, AWSManagedRulesSQLiRuleSet, AWSManagedRulesAmazonIpReputationList, AWSManagedRulesLinuxRuleSet, AWSManagedRulesWindowsRuleSet, AWSManagedRulesUnixRuleSet), custom rules (byte-match, regex pattern set, geo-match, rate-based), IP set and regex pattern set resources, rule priority ordering (lowest number evaluated first), action types (allow, block, count, CAPTCHA, Challenge), bot control managed rule group, account takeover. Triggers: create WAF rule, WAF managed rule group, WAF custom rule, WAF byte match, WAF geo match, WAF rate based rule, WAF IP set, WAF regex pattern set, WAF WCU budget, WAF CloudFront ACL, WAF logging Kinesis Firehose, WAF bot control, WAF ATP, WAF label matching, WAF Challenge action, WAF CAPTCHA.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwaf-rule-deployer\u002FSKILL.md",[],[]]