diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emr/private/cluster-utils.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emr/private/cluster-utils.ts index 0a2090f592ab4..4906055e0389b 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emr/private/cluster-utils.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emr/private/cluster-utils.ts @@ -151,7 +151,7 @@ function SpotProvisioningSpecificationPropertyToJson(property?: EmrCreateCluster return undefined; } if (!cdk.Token.isUnresolved(property.timeoutDurationMinutes) && (property.timeoutDurationMinutes < 5 || property.timeoutDurationMinutes > 1440)) { - throw new Error(`timeout duration must be between 5 and 1440 minutes, got ${property.timeoutDurationMinutes}`); + throw new Error(`timeoutDurationMinutes must be between 5 and 1440, got ${property.timeoutDurationMinutes}`); } return { AllocationStrategy: cdk.stringToCloudFormation(property.allocationStrategy), diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/emr/emr-create-cluster.test.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/emr/emr-create-cluster.test.ts index 5b8041e6a65e5..2038d779c12f6 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/emr/emr-create-cluster.test.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/emr/emr-create-cluster.test.ts @@ -1239,7 +1239,7 @@ test('Throws if timeoutDurationMinutes for Spot instances is less than 5', () => // THEN expect(() => { task.toStateJson(); - }).toThrow(/timeout duration must be between 5 and 1440 minutes, got 4/); + }).toThrow(/timeoutDurationMinutes must be between 5 and 1440, got 4/); }); test('Throws if timeoutDurationMinutes for Spot instances is greater than 1440', () => { @@ -1267,7 +1267,7 @@ test('Throws if timeoutDurationMinutes for Spot instances is greater than 1440', // THEN expect(() => { task.toStateJson(); - }).toThrow(/timeout duration must be between 5 and 1440 minutes, got 1441/); + }).toThrow(/timeoutDurationMinutes must be between 5 and 1440, got 1441/); }); test('Throws if both bidPrice and bidPriceAsPercentageOfOnDemandPrice are specified', () => {