From f3840cc8f9f9e5dfb63a65d5944b7e6bfae14534 Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Sat, 30 Dec 2023 23:51:58 +0900 Subject: [PATCH] change branch condition --- .../aws-stepfunctions-tasks/lib/emr/private/cluster-utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 69289541031e0..a63c9becf7ed2 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 @@ -158,7 +158,8 @@ function SpotProvisioningSpecificationPropertyToJson(property?: EmrCreateCluster throw new Error(`timeout must be between 5 and 1440 minutes, got ${property.timeout.toMinutes()}`); } if ( - property.timeoutDurationMinutes + !property.timeout // ignore validation because `timeoutDurationMinutes` is not used if a `timeout` is specified + && property.timeoutDurationMinutes && !cdk.Token.isUnresolved(property.timeoutDurationMinutes) && (property.timeoutDurationMinutes < 5 || property.timeoutDurationMinutes > 1440) ) {