KumiluPERSONAL WORKS
← Back to Glue inventory

KUMILU / DOCUMENTATION · 1.0.23

Lite guide

Lite inventory (default)

Package 1.0.23. Run scripts only in your approved AWS environment. Kumilu serves generic code and synthetic examples; real results remain in your selected S3 location. Language variants change comments and explanatory docstrings only. Field names, AWS APIs, runtime messages and execution logic are shared.

VariantStandalone fileColumnsLatest-run times
Lite, defaultglue_workflow_inventory_lite.py32No history reads
Lite + run timesglue_workflow_inventory_lite_with_runs.py38Job JST times, raw Workflow times and both durations
Fullglue_workflow_inventory.py64Included, plus detailed configuration JSON

Run in AWS Glue

  1. Create a separate Python Shell 3.9 Job with the analytics library set and the approved execution Role. Suggested settings: 0.0625 DPU and Job Max retries = 0.
  2. Upload the selected standalone script. No explicit keys, profile or role assumption are used.
  3. Grant the required static read APIs and S3 output access, then run with:

--REGION         ap-northeast-1

--OUTPUT_S3_URI  s3://example-output-bucket/glue-investigation/

Each run writes exactly one tab-separated UTF-8-SIG CSV. The filename is YYYYMMDD_HHMMSS_glue_job_inventory.csv, using startup time in JST (UTC+9). Same-second runs to the same prefix can collide. Legacy URIs ending in glue_job_inventory.csv are accepted but produce a timestamped basename.

Use iam-inventory-policy.json as a scoped example; replace sample account, Region and bucket paths. PutObject must allow ????????_??????_glue_job_inventory.csv inside the approved prefix. Runtime script-read, trust, logging and any KMS permissions are separate; use iam-runtime-policy.json as an example and add the exact selected script path. No policies are changed by the scripts.

Matching and blank values

  • Exact Job names establish membership; Graph provides Workflow associations, Actions identify target Jobs and Predicate identifies predecessors. Standalone Jobs are included and Job names are deduplicated.
  • A unique Workflow fills its name and description; multiple memberships leave scalar Workflow fields blank and produce warnings. Job Description is a separate field.
  • A unique SCHEDULED Trigger supplies raw ScheduleCron. A unique CONDITIONAL Trigger supplies PreviousJobs in original order, comma-separated, without deduplication. Those names alone do not encode states, AND/ANY or Crawler conditions.
  • Multiple Triggers leave scalar Trigger/Cron/PreviousJobs fields blank. Lite variants keep their names in warnings but omit details; use Full for complete per-Trigger JSON.
  • NonOverridableArguments overrides same-name DefaultArguments in dedicated parameter columns. Trigger arguments are not merged into guessed effective runtime values.
  • Lite variants omit full parameter and Trigger JSON, including unlisted custom arguments. They do not redact selected values. Full preserves structured JSON with sensitive-key redaction.
  • Missing values are blank, never fabricated as zero. Actual 0/false values remain. Check InvestigationWarnings before treating blanks as absent resources.

Workflow names may come from Triggers before metadata is loaded. Version 1.0.20 fetches each newly referenced Workflow once by exact name with GetWorkflow(IncludeGraph=False), filling Description and, in run-enabled variants, LastRun caches without changing existing associations. No new API type or IAM action is needed. Check InvestigationWarnings: metadata unavailable identifies missing details; Description empty or absent identifies blank/missing description (also inspect read errors); no run history available identifies missing LastRun. A running completion remains blank.

Request pacing and warning scope (1.0.21)

All three inventory scripts wait one second before each Glue HTTP send, including SDK retries. Edit GLUE_REQUEST_INTERVAL_SECONDS at the top to 2.0 for slower reads. Glue uses standard backoff with up to eight total attempts; retry quota may stop earlier. S3 retains its original four-attempt configuration and has no added delay. The standalone permission checker is unchanged. Each 100 sends add at least about 100 seconds of deliberate wait, plus network and backoff time. Account/Region traffic from other tools may still cause throttling.

Workflow/Trigger detail warnings follow related Job rows by exact name. Unmatched details remain in the full log. Genuine global enumeration/association warnings may still repeat across rows. A repeated global summary does not mean every Job read failed.

Leading zero hours/minutes are omitted: 5 m 30 s, 05 s, or 00 s; otherwise 1 h 5 m 30 s. After the first nonzero unit, keep smaller zero units: 1 h 0 m 00 s.

No execution-history reads

The default lite script has no latest-run columns and never calls GetJobRuns. Its filename still includes a startup timestamp. Remove the optional GetJobRuns grant if using the shared IAM example only for this variant.

Fields in output order

#FieldMeaning
1JobNameExact Job name; first column and lookup key.
2DescriptionJob description; distinct from WorkflowDescription.
3JobTypeDisplay type derived from Command.Name: Spark, Spark Streaming, Python Shell or Ray.
4GlueVersionConfigured Glue version; never inferred when absent.
5PythonVersionPython version returned in Job.Command.
6JobLanguageRaw --job-language value.
7ScriptLocationScript location, usually S3; script contents are not read.
8IAMRoleThe Job's configured execution Role name or ARN.
9WorkerTypeConfigured worker type, not observed resource usage.
10NumberOfWorkersConfigured number of workers, not the observed count.
11MaxCapacityConfigured compute capacity in DPUs; not a worker count.
12AutoScalingRaw --enable-auto-scaling parameter; not observed scaling activity.
13TimeoutConfigured Job timeout in minutes, not run duration.
14MaxRetriesMaximum automatic retries after failure; zero is preserved.
15MaxConcurrentRunsMaximum simultaneous runs allowed for this Job.
16ConnectionsBound connection names, comma-separated; no connection details or credentials are read.
17ExtraPyFilesRaw --extra-py-files paths; non-overridable arguments win.
18ExtraPyFileNamesFilenames derived from ExtraPyFiles, omitting query strings and fragments.
19ExtraJarsRaw --extra-jars paths.
20ExtraJarNamesFilenames derived from ExtraJars.
21AdditionalPythonModulesRaw --additional-python-modules specification, including versions if present.
22ExtraFilesRaw --extra-files paths; applicability depends on Job type.
23ExtraFileNamesFilenames derived from ExtraFiles.
24TempDirRaw --TempDir temporary-directory path.
25WorkflowNameUnique associated Workflow; blank for no membership or multiple memberships.
26WorkflowDescriptionDescription of the unique associated Workflow; not the Job description.
27TriggerNameUnique Trigger that starts this Job; blank if multiple Triggers match.
28TriggerTypeSCHEDULED, CONDITIONAL, ON_DEMAND or EVENT; scalar field requires a unique Trigger.
29TriggerStateTrigger configuration state, not Job execution state.
30ScheduleCronOriginal Cron for a unique SCHEDULED Trigger; blank otherwise.
31PreviousJobsPredecessor Job names for a unique conditional Trigger; comma-separated in original order, retaining duplicates.
32InvestigationWarningsGlobal discovery warnings plus this Job and its related Workflow/Trigger details. Unmatched resource details remain in the full log; blanks do not prove account-wide coverage.

Excel lookup

JobName stays first; Description is column 2. Rename the reference sheet to Inventory for this example.


=VLOOKUP(A2,Inventory!$A:$AF,2,FALSE)

Errors, output and validation

Read failures produce warnings and may still allow partial output. Lite variants stop without upload when discovery has warnings and no Jobs were found; successful empty discovery may write a header. Programming errors stop lite collection. Full preserves its existing partial-result behavior and optional strict exit mode. A successful Job does not prove the inventory is exhaustive.

Excel-risk prefixes receive an apostrophe and a warning. Values over 32,767 characters are retained, not truncated. Import using Tab and Text types, especially JobName, to preserve leading zeros. SDK retries are bounded and list enumeration is paginated. Scripts do not modify or start business Glue resources.

The canonical scripts passed 98 offline tests (90 mock/standard and 8 SDK contract/fake-transport tests). Each comment-language variant also passes Python 3.9 parsing and executable-AST equivalence checks. These checks do not replace real company Glue/IAM/S3/KMS/network and Excel validation.