Repository: aws-cloudformation/cfn-lint (python)

Issue:
cf-lint throws an error on valid values for Elasticache Readenpoint address
### CloudFormation Lint Version

v1.11.0

### What operating system are you using?

Windows

### Describe the bug

Below is the yaml I am using for CLoudwatch alarm

Type: AWS::CloudWatch::Alarm
    DependsOn: ElasticacheRedis
    Properties:
      Dimensions:
        - Name: CacheClusterId
          Value: !Select [ 0, !Split [ "." , !Select [ 1, !Split [ "[", !Select [ 0, !Split [ " " , !GetAtt ElasticacheRedis.ReadEndPoint.Addresses ] ] ] ] ] ]


cfn-lint throws an error that
E1017 {'Fn::GetAtt': ['ElasticacheRedis', 'ReadEndPoint.Addresses']} is not of type 'string'

I am sure this was working a while back

Note: I have trimmed the content and just left the problematic line

### Expected behavior

There should not be any lint errors

### Reproduction template

Type: AWS::CloudWatch::Alarm
    DependsOn: ElasticacheRedis
    Properties:
      Dimensions:
        - Name: CacheClusterId
          Value: !Select [ 0, !Split [ "." , !Select [ 1, !Split [ "[", !Select [ 0, !Split [ " " , !GetAtt ElasticacheRedis.ReadEndPoint.Addresses ] ] ] ] ] ]


Patch:
diff --git a/src/cfnlint/rules/functions/GetAtt.py b/src/cfnlint/rules/functions/GetAtt.py
index 00d65ece81..7a97ce82cc 100644
--- a/src/cfnlint/rules/functions/GetAtt.py
+++ b/src/cfnlint/rules/functions/GetAtt.py
@@ -12,7 +12,7 @@
 
 from cfnlint.helpers import ensure_list, is_types_compatible
 from cfnlint.jsonschema import ValidationError, ValidationResult, Validator
-from cfnlint.rules.functions._BaseFn import BaseFn, all_types
+from cfnlint.rules.functions._BaseFn import BaseFn
 from cfnlint.schema import PROVIDER_SCHEMA_MANAGER
 
 
@@ -29,7 +29,7 @@ class GetAtt(BaseFn):
     tags = ["functions", "getatt"]
 
     def __init__(self) -> None:
-        super().__init__("Fn::GetAtt", all_types)
+        super().__init__("Fn::GetAtt", ("string", "boolean", "integer", "number"))
 
     def schema(self, validator, instance) -> dict[str, Any]:
         resource_functions = []
@@ -127,6 +127,9 @@ def _resolve_getatt(
                             continue
 
                         schema_types = ensure_list(getatt_schema.get("type"))
+                        if "array" in schema_types:
+                            schema_types.remove("array")
+                            schema_types.append("string")
 
                         types = ensure_list(s.get("type"))
 


Test patch:
diff --git a/test/unit/rules/functions/test_getatt.py b/test/unit/rules/functions/test_getatt.py
index e1c54f0dfa..14ce2aec19 100644
--- a/test/unit/rules/functions/test_getatt.py
+++ b/test/unit/rules/functions/test_getatt.py
@@ -134,8 +134,8 @@ def validate(self, validator, s, instance, schema):
             [
                 ValidationError(
                     "{'Fn::GetAtt': 'MyBucket.Arn'} is not of type 'array'",
-                    path=deque(["Fn::GetAtt"]),
-                    schema_path=deque(["type"]),
+                    path=deque([]),
+                    schema_path=deque([]),
                     validator="fn_getatt",
                 ),
             ],
@@ -149,8 +149,8 @@ def validate(self, validator, s, instance, schema):
             [
                 ValidationError(
                     "{'Fn::GetAtt': 'MyBucket.Arn'} is not of type 'array', 'object'",
-                    path=deque(["Fn::GetAtt"]),
-                    schema_path=deque(["type"]),
+                    path=deque([]),
+                    schema_path=deque([]),
                     validator="fn_getatt",
                 ),
             ],
diff --git a/test/unit/rules/functions/test_sub.py b/test/unit/rules/functions/test_sub.py
index 7cb09eca60..ca9a465670 100644
--- a/test/unit/rules/functions/test_sub.py
+++ b/test/unit/rules/functions/test_sub.py
@@ -274,15 +274,7 @@ def context(cfn):
             "Invalid Fn::Sub with a GetAtt to an array of attributes",
             {"Fn::Sub": "${MySimpleAd.DnsIpAddresses}"},
             {"type": "string"},
-            [
-                ValidationError(
-                    ("'MySimpleAd.DnsIpAddresses' is not of type 'string'"),
-                    instance="MySimpleAd.DnsIpAddresses",
-                    path=deque(["Fn::Sub"]),
-                    schema_path=deque([]),
-                    validator="fn_sub",
-                ),
-            ],
+            [],
         ),
         (
             "Invalid Fn::Sub with a GetAtt to an integer",