AWS Glue ExecModule
Overview
AwsGlueModule reads run history for one AWS Glue job and looks up the state of a known run. Use a run's state and available timestamps to decide whether a dataset is ready, build a status report, or route an exception to the team that owns the job.
The module uses AWS-signed requests to the regional Glue API. Its two operations return a small, consistent run summary. They make no changes to jobs, runs, schedules, or bookmarks.
Usage
- Create a verified,
READYAWS Glue connection in the Integration Account Console. - In Workflow Studio, add AWS Glue and choose the saved account under General > Connection.
- Set the region and exact job name. Use
list_job_runswhen you need recent history, or map a run ID intoget_job_runwhen you already know which execution to check. - Route the result to a decision or reporting step. Decide what to do when a run is still in progress, the history page is empty, or Glue could not be reached.
Inputs
| Input | Type | Required | Default | Purpose |
|---|---|---|---|---|
operation | string | Yes | — | list_job_runs or get_job_run. |
region | string | Yes | — | Standard AWS region where the job runs, for example us-west-2. |
jobName | string | Yes | — | Exact, nonblank, single-line Glue job name with a maximum length of 255. |
runId | string | For exact lookup | — | Exact, nonblank, single-line Glue run ID with a maximum length of 255. |
limit | integer | No | 25 | For history, the maximum number of runs in one page, from 1 to 200. |
nextToken | string | No | — | For history, the opaque continuation token returned by the previous page, up to 4,096 characters. |
Outputs
| Output | Meaning |
|---|---|
status / operation | Module result status and the operation executed. |
items / count | Run summaries and the number of runs returned in this history page. |
hasMore / nextToken | History continuation flag and token when another page is available. |
data | One normalized run summary for get_job_run. |
requestId | AWS request ID when available. |
error | Stable code, redacted message, retryability hint, and HTTP status when available. |
Run summaries include jobName, runId, and Glue's state. When supplied by Glue, they also include attempt, the UTC timestamps startedOn, completedOn, and lastModifiedOn, and executionTime in seconds. Missing timestamps are unknown. A successful module response can contain a failed, stopped, or running Glue execution. Use the run's state to decide how to proceed.
IntegrationAccount Requirements
Use the AWS Glue template with account name AWS. Enter the access key ID in the API key field and the secret access key in the protected password field. Verify the saved account and confirm it is READY before use. The workflow binds the account by ID and does not need credential fields in its payload.
Give the AWS identity only the actions required by its steps. Use glue:GetJobRuns for history and glue:GetJobRun for exact lookup. Scope each action to the job ARN, such as arn:aws:glue:us-west-2:123456789012:job/warehouse_daily. Substitute your AWS partition, region, account, and job name. See AWS Glue IAM guidance for resource scoping.
Configuration
Select the account for the job's AWS account and enter the region separately. The module derives the Glue service endpoint from that region. It uses the stored access key pair and does not accept custom endpoints or session tokens. Test your account and job name with a small history page before using run state to gate a downstream action.
Operations
list_job_runscalls GetJobRuns for the named job. Glue returns the newest runs first. When you need more history, send the returned token unchanged with the same account, job, region, and page size.get_job_runcalls GetJobRun for a known job name and run ID. It returns the state of that execution without requesting predecessor runs.
Errors and Failure Modes
- Missing fields, invalid input, and an unready or unverified account fail before the request. Fix the input or verify the saved connection.
- For access errors, check the identity, Glue action, and exact job ARN. For a missing job or run, check the region, account, job name, and run ID.
- Throttling, service errors, and timeouts can be transient. Use the retryability hint to bound any workflow-level retries and stagger polling across jobs.
- An invalid provider response is an error. Handle it separately from a successful page with zero items and from a run that has reached a failure state.
Example
Before publishing a morning warehouse report, inspect the latest runs of the warehouse_daily Glue job.
{
"operation": "list_job_runs",
"region": "us-west-2",
"jobName": "warehouse_daily",
"limit": 5
}
Expect up to five summaries. Check that a run's available completion timestamp falls inside the expected reporting window and that its state is SUCCEEDED before releasing the report. An older successful run is useful context but does not establish freshness for today's report. When another workflow supplies the exact run ID, use get_job_run and check the single result under data.
Notes
- Reads are safe to repeat. A repeat read can return a different state as the job runs. When polling, use the job and run IDs to avoid duplicate notifications.
- Each history step reads one page. Apply a page or time budget when following tokens and keep the result within your workflow's needs.
- The module excludes run arguments, provider error details, state detail text, task logs, and raw responses. It does not read data produced by a job or start, stop, or rerun it.