【问题标题】:AWS CDK Glue Job + Trigger created but won't runAWS CDK Glue 作业 + 触发器已创建但不会运行
【发布时间】:2021-03-27 02:28:15
【问题描述】:

我在 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,
    },

  ],
});

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

【问题讨论】:

    标签: amazon-cloudformation aws-glue aws-cdk


    【解决方案1】:

    需要在 CfnTrigger 的 props 中添加“startOnCreation: true”,这样会默认开启触发状态。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-06-10
      • 1970-01-01
      • 1970-01-01
      • 2021-07-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多