Reputation: 9411
I have the following AWS CDK configuration in TypeScript (abriged):
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,
},
],
});
The trigger is created, it is seen in the Console and it is linked to the Job. But it just won't run (manual Job run is OK). What am I missing?
Upvotes: 1
Views: 3497
Reputation: 56
You need to add "startOnCreation: true" to the CfnTrigger props, so the trigger status will be enabled by default.
Upvotes: 4