CloudFormation a way to define an ACTIVATED scheduled Glue job trigger
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
Yes, CloudFormation can define a scheduled AWS Glue trigger that is created in an active state. The key resource is AWS::Glue::Trigger, and the important property for activation is StartOnCreation: true when the trigger type is SCHEDULED.
The Core Resource Shape
A scheduled Glue trigger in CloudFormation needs:
- a Glue job to run
- a trigger of type
SCHEDULED - a schedule expression
- one or more actions
- '
StartOnCreation: trueif you want it activated immediately'
Here is a minimal YAML example:
This creates a trigger that runs the job every day at the scheduled time and starts in the activated state.
What StartOnCreation Actually Does
Without StartOnCreation: true, the trigger can be created but remain inactive until you start it manually. That is often the missing detail when people say "the trigger exists, but it is not activated."
So the operational distinction is:
- resource exists
- trigger is enabled and ready to fire
CloudFormation can handle both, but you need to declare the second state explicitly.
Schedule Syntax
Glue scheduled triggers use a cron-style expression in AWS format:
That example runs once per day at 12:00 UTC. The time zone behavior is important because teams often expect local time while AWS services interpret the cron expression in UTC unless another service layer changes that behavior.
Always validate the expression operationally, not just syntactically.
Multiple Actions
A trigger can launch more than one job action:
That is useful for small coordinated workflows, although more complex dependencies are often better modeled with Glue workflows or other orchestration services.
Full Example with Role
The Glue job still needs all the usual prerequisites such as the IAM role, script location, and access to its data sources.
Operational Checks After Deployment
After the stack is created, verify:
- the trigger exists
- the trigger state is activated
- the cron expression is what you intended
- the job role has enough permissions
A trigger that is perfectly defined in CloudFormation can still fail at runtime if the job script or IAM policy is wrong.
When You Might Not Want Immediate Activation
Sometimes StartOnCreation: true is not desirable. For example:
- you want the stack created before the schedule begins
- upstream datasets are not ready
- the job should be activated in a later release step
In those cases, create the trigger without automatic activation and start it intentionally afterward.
Common Pitfalls
- Creating
AWS::Glue::TriggerwithoutStartOnCreation: trueand assuming the trigger will be active automatically. - Using an invalid or unintended cron expression, especially when local time and UTC expectations differ.
- Defining the trigger correctly but forgetting that the referenced Glue job still needs a valid IAM role and script location.
- Assuming scheduled triggers are the right orchestration tool for every workflow, even when dependencies would be clearer in Glue workflows or Step Functions.
- Verifying only stack creation success instead of checking the runtime trigger state in Glue after deployment.
Summary
- CloudFormation can define an activated scheduled Glue trigger with
AWS::Glue::Trigger. - Use
Type: SCHEDULED, provide aSchedule, and setStartOnCreation: true. - The trigger only works if the referenced Glue job is correctly defined and permitted.
- Cron timing should be checked carefully because schedule interpretation matters operationally.
- A created trigger and an activated trigger are not the same thing; declare the state you want.

