diff --git a/troposphere/validators/apigateway.py b/troposphere/validators/apigateway.py index ffb998732..68137f10b 100644 --- a/troposphere/validators/apigateway.py +++ b/troposphere/validators/apigateway.py @@ -4,7 +4,7 @@ # See LICENSE file for full license. -from . import integer_range, json_checker, positive_integer, tags_or_list +from . import json_checker, positive_integer, tags_or_list def dict_or_string(x): @@ -29,7 +29,10 @@ def validate_timeout_in_millis(x): """ Property: Integration.TimeoutInMillis """ - return integer_range(50, 29000)(x) + int(x) + if x < 50: + raise ValueError(f"TimeoutInMillis of {x} must be greater than 50") + return x def validate_authorizer_ttl(ttl_value): diff --git a/troposphere/validators/apigatewayv2.py b/troposphere/validators/apigatewayv2.py index c06b47879..7f6157dc0 100644 --- a/troposphere/validators/apigatewayv2.py +++ b/troposphere/validators/apigatewayv2.py @@ -4,7 +4,7 @@ # See LICENSE file for full license. -from . import integer_range, json_checker, positive_integer +from . import json_checker, positive_integer def dict_or_string(x): @@ -21,7 +21,10 @@ def validate_timeout_in_millis(x): """ Property: Integration.TimeoutInMillis """ - return integer_range(50, 29000)(x) + int(x) + if x < 50: + raise ValueError(f"TimeoutInMillis of {x} must be greater than 50") + return x def validate_integration_type(integration_type):