By using AWS re:Post, you agree to the Terms of Use
/adding etl workflow to event rule/

adding etl workflow to event rule


Hi team,

I want to add a glue workflow as a target to my rule

import * as events from "@aws-cdk/aws-events";

const rule = new events.Rule(
          "description here....",
        ruleName: "newObj",
        enabled: true,
        eventPattern: {
          source: ["aws.s3"],
          detailType: ["Object Created"],
          detail: {
            bucket: {
              name: ["test_bucket"],

rule.addTarget(new targets.....);

I can't find glue workflow as a target on the targets list so that I can add it as a target to my rule.

is there any other way to do it other than using ..addTarget method?

thank you.

2 Answers
Accepted Answer

I was able to do it using the CfnRule construct :

new events.CfnRule(
        targets: [
            arn: `arn:aws:glue:${Aws.REGION}:${Aws.ACCOUNT_ID}:workflow/${}`,
            id: "some_id",
            roleArn: myRole.roleArn,
answered 24 days ago


Unfortunately, Glue workflow is not a supported target for AWS CDK aws_events module as shown here I could also see a feature request was opened recently here

An alternative is to write a simple Lambda function to start a Glue workflow using boto3 client and choose this lambda function as a target.

Glue start workflow boto3 client

However , both AWS events cli and events boto3 does support Glue workflow as a target.


1. AWS events cli put-targets

2. AWS events boto3 put-targets

3. Starting AWS Glue workflow with eventbridge CLI

answered 25 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions