AWS CDK Glue 作业 + 触发器已创建但不会 运行

AWS CDK Glue Job + Trigger created but won't run

我在 TypeScript 中有以下 AWS CDK 配置(删节):

const jobProps = {
  command: {
    name: 'glueetl',
    pythonVersion: '3',
    scriptLocation: `s3://${s3bucket.bucketName}/${this.scriptName}`,
  },
  connections: { connections: [connectionName] },

  defaultArguments: { },
  description: idEnv + '-job',
  executionProperty: {
    maxConcurrentRuns: 1,
  },
  glueVersion: '2.0',
  maxRetries: 0,
  name: idEnv + '-job',
  numberOfWorkers: 2,
  role: glueServiceRole.roleArn,
  timeout: 180, // minutes
  workerType: 'Standard',
};
const job = new CfnJob(this, idEnv, jobProps);


const trigger = new CfnTrigger(this, idEnv + '-trigger', {
  type: 'SCHEDULED',
  description: 'Scheduled run for ' + job.name,
  schedule: this.JOB_SCHEDULE,
  actions: [
    {
      jobName: job.name,
    },

  ],
});

触发器已创建,可以在控制台中看到它并链接到作业。但它不会 运行(手动作业 运行 即可)。我错过了什么?

您需要在CfnTrigger 属性中添加"startOnCreation: true",这样触发状态将默认启用。