diff --git a/src/cfnlint/rules/resources/CreationPolicy.py b/src/cfnlint/rules/resources/CreationPolicy.py index 84a922a33..67a2c9778 100644 --- a/src/cfnlint/rules/resources/CreationPolicy.py +++ b/src/cfnlint/rules/resources/CreationPolicy.py @@ -83,6 +83,10 @@ def validate(self, validator: Validator, dP: str, instance, schema): return resource_type = validator.context.resources[resource_name].type + # Fn::Select declares an all_types output, so the generic output-type + # check (see #4641) treats it as object-compatible. CloudFormation, + # however, rejects a bare Fn::Select here ("Expected an object") unless + # AWS::LanguageExtensions resolves it before deployment. See #4645. function, _ = is_function(instance) if ( function == "Fn::Select" diff --git a/src/cfnlint/rules/resources/updatepolicy/Configuration.py b/src/cfnlint/rules/resources/updatepolicy/Configuration.py index 2abd10eb4..2319d5a41 100644 --- a/src/cfnlint/rules/resources/updatepolicy/Configuration.py +++ b/src/cfnlint/rules/resources/updatepolicy/Configuration.py @@ -32,6 +32,10 @@ def __init__(self) -> None: ) def validate(self, validator: Validator, keywords: Any, instance: Any, schema: Any): + # Fn::Select declares an all_types output, so the generic output-type + # check (see #4641) treats it as object-compatible. CloudFormation, + # however, rejects a bare Fn::Select here ("Expected an object") unless + # AWS::LanguageExtensions resolves it before deployment. See #4645. update_policy = instance.get("UpdatePolicy") function, _ = is_function(update_policy) if ( @@ -44,15 +48,6 @@ def validate(self, validator: Validator, keywords: Any, instance: Any, schema: A rule=self, instance=update_policy, validator="type", - validator_value="object", - schema_path=[ - "allOf", - 0, - "then", - "properties", - "UpdatePolicy", - "type", - ], ) return diff --git a/test/unit/rules/resources/updatepolicy/test_configuration.py b/test/unit/rules/resources/updatepolicy/test_configuration.py index 9ae98157f..fcaab44be 100644 --- a/test/unit/rules/resources/updatepolicy/test_configuration.py +++ b/test/unit/rules/resources/updatepolicy/test_configuration.py @@ -66,15 +66,6 @@ def rule(): ] }, validator="type", - validator_value="object", - schema_path=[ - "allOf", - 0, - "then", - "properties", - "UpdatePolicy", - "type", - ], ) ], ),