Skip to content
>GLB_
Go back

How to Disable an AWS Glue Trigger from the CLI

When working with AWS Glue, triggers are an important mechanism to orchestrate jobs or workflows. Sometimes, however, you may need to temporarily disable a trigger without deleting it—for example, to pause scheduled ingestions during maintenance or testing. This article explains how to disable a trigger using the AWS CLI.


Understanding AWS Glue Triggers

AWS Glue supports different types of triggers:

Each trigger can be in one of the following states:


The Problem

A common mistake is attempting to disable a trigger using:

aws glue update-trigger --name my-trigger --trigger-update '{"State": "DISABLED"}'

This fails because State is not a valid parameter in update-trigger. Instead, AWS Glue provides explicit commands to start or stop triggers.


The Correct Way to Disable a Trigger

To disable (stop) a trigger:

aws glue stop-trigger --name sales-data-trigger

This will change the trigger state from ACTIVATED to DEACTIVATED, preventing it from firing until re-enabled.

To re-enable (start) the trigger:

aws glue start-trigger --name sales-data-trigger

Verifying the Trigger State

You can confirm the current status of your trigger by running:

aws glue get-trigger --name sales-data-trigger

The output will include:

{
    "Trigger": {
        "Name": "sales-data-trigger",
        "Type": "SCHEDULED",
        "TriggerState": "DEACTIVATED",
        "Schedule": "cron(0 12 * * ? *)",
        ...
    }
}

Conclusion

Disabling a trigger in AWS Glue is straightforward once you know the correct commands:

This allows you to pause or resume orchestrated jobs without having to delete or recreate triggers, offering more control over your ETL pipelines.


References


Share this post:

Previous Post
How to Set CloudWatch Log Retention Policies with Terraform
Next Post
Orchestrating Multiple AWS Glue Workflows with Step Functions