无法转换 AWS API 网关响应模板映射 json 字符串

AWS API Gateway Response Template Mapping json string cannot be converted

我的 Spring 基于 AWS Lambda 函数(v3.1.6)的 AWS Lambda 函数(没有 Lambda 代理集成)returns 通过 API 网关的数据列表,格式如下:

{
  "isBase64Encoded": false,
  "headers": {
    "id": "<some_id>",
    "contentType": "application/json",
    "timestamp": "1644307568294"
  },
  "body": "{\"resultList\":[{\"id\":\"1\",\"name\":\"item\",(...some other fields...)}]}",
  "statusCode": 200
}

我的问题是我想在 JSON 中 return response.body (我还创建了一个模型模式):

{
    "resultList": [
        { 
            "id": "1", "name": "item ",(...some other fields...)
        }
    ]
}

我已经配置了一个基于 application/json 的响应模板映射来将响应转换为所需的格式:

$util.parseJson($input.json('$.body'))

我想要哪个 returned(查看附图):

但是当我通过 Postman 调用它时,我得到了这个:

{
    "message": "Internal server error"
}

在 CloudWatch 中我可以看到这个日志:

2022-02-08T08:56:00.688+01:00   (...) Endpoint response body before transformations: [Binary Data]
2022-02-08T08:56:00.694+01:00   (...) Execution failed due to configuration error: Unable to transform response

可能是什么问题?

问题出在我的 AWS API 网关设置上。