AWS Glue Trigger

This page shows how to write Terraform and CloudFormation for AWS Glue Trigger and write them securely.

aws_glue_trigger (Terraform)

The Trigger in AWS Glue can be configured in Terraform with the resource name aws_glue_trigger. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub

glue_workflow_complex.tf#L23
resource "aws_glue_trigger" "start_complex" {
  name          = "start_complex"
  type          = "ON_DEMAND"
  workflow_name = module.glue_workflow_complex.workflow_name

  dynamic "actions" {
main.tf#L17
resource "aws_glue_trigger" "scheduled_trigger" {
  name     = "scheduled_trigger"
  schedule = "cron(0 0 * * ? *)"
  type     = "SCHEDULED"

  actions {

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages a Glue Trigger resource.

AWS::Glue::Trigger (CloudFormation)

The Trigger in Glue can be configured in CloudFormation with the resource name AWS::Glue::Trigger. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

Workflow3Triggers.yml#L72
    Type: AWS::Glue::Trigger
    Properties:
      Actions:
        - JobName: !Ref GlueJobTrigger1Name
      Description: !Ref GlueJobTrigger1Description
      Name: !Ref GlueJobTrigger1Name
glue-workflow-stack.yml#L40
    Type: AWS::Glue::Trigger
    Properties:
      Name: t_Start
      Type: SCHEDULED
      Schedule: cron(0 8 * * ? *) # Runs once a day at 8 AM UTC
      StartOnCreation: true
glue-workflow-stack.yml#L40
    Type: AWS::Glue::Trigger
    Properties:
      Name: t_Start
      Type: SCHEDULED
      Schedule: cron(0 8 * * ? *) # Runs once a day at 8 AM UTC
      StartOnCreation: true
glue.yml#L326
    Type: "AWS::Glue::Trigger"
    Properties:
      Actions:
        - CrawlerName: !Ref GlueCrawler6RawCrawler
      Name: !Sub "ScheduledStart-${AWS::Region}"
      Type: SCHEDULED
glue.yml#L326
    Type: "AWS::Glue::Trigger"
    Properties:
      Actions:
        - CrawlerName: !Ref GlueCrawler6RawCrawler
      Name: !Sub "ScheduledStart-${AWS::Region}"
      Type: SCHEDULED
workflow-stack.template.json#L601
      "Type": "AWS::Glue::Trigger",
      "Properties": {
        "Actions": [
          {
            "JobName": "glue-workflow-assetjob",
            "Timeout": 120
aws_glue.json#L54
    "path": "/PropertyTypes/AWS::Glue::Trigger.Predicate/Properties/Logical/Value",
    "value": {
      "ValueType": "AWS::Glue::Trigger.Predicate.Logical"
    }
  },
  {
aws_glue.json#L54
    "path": "/PropertyTypes/AWS::Glue::Trigger.Predicate/Properties/Logical/Value",
    "value": {
      "ValueType": "AWS::Glue::Trigger.Predicate.Logical"
    }
  },
  {
CFN_Redshift_GlueJob.json#L296
            "Type": "AWS::Glue::Trigger",
            "Properties": {
                "Name": "Start-WF",
                "Type": "ON_DEMAND",
                "Description": "Starting the WF trigger",
                "Actions": [{
Glue-redshift-benchmark-workflow.template.json#L283
      "Type": "AWS::Glue::Trigger",
      "Properties": {
        "Actions": [
          {
            "JobName": "tpcds-benchmark-create-tables"
          }

Parameters

Explanation in CloudFormation Registry

The AWS::Glue::Trigger resource specifies triggers that run AWS Glue jobs. For more information, see Triggering Jobs in AWS Glue and Trigger Structure in the AWS Glue Developer Guide.

Frequently asked questions

What is AWS Glue Trigger?

AWS Glue Trigger is a resource for Glue of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Glue Trigger?

For Terraform, the SJREDDY6/terra and m-voels/tftest source code examples are useful. See the Terraform Example section for further details.

For CloudFormation, the MarcoAP/AWSTraining, duyhoang15/test and aws-samples/provision-codepipeline-glue-workflows source code examples are useful. See the CloudFormation Example section for further details.