此错误表示 CloudFormation 资源属性 / RequestParameters / MessageAttributes 的值不是字符串类型。解决此问题的方法是使用正确的数据类型。以下是一个代码示例:
"MessageAttributes": {
"Type": "Map",
"Default": {},
"Description": "Message attributes for the Lambda function invocation request payload",
"ConstraintDescription": "must be a valid MessageAttributeMap"
},
在此示例中,我们指定 MessageAttributes 属性的类型为 Map。请确保您在资源属性中使用与属性值匹配的正确数据类型。