【以下的问题经过翻译处理】 你好,这是我的配置:
mydomain.com -> API GW Custom Domain -> HTTPAPI -> Route (/api/{+proxy}) -> VPCLink -> ALB -> HTTPS Listener -> TargetGroup (Type: Instance) -> ECS Fargate Service
HTTPAPI集成具有以下参数映射:path -> overwrite -> /$request.path.proxy(我想去掉url中的“api”部分)
当我提出以下请求时,我收到 500 个错误 https://mydomain.com/api/otherPath
我已启用 HTTPAPI 上的访问日志,但它们显示的信息非常有限。 ALB 日志发送到 S3 存储桶,因此几乎不可能跟踪请求。 据我所知,请求没有到达 Fargate 服务,但我不确定。
API GW HTTP API 的访问日志示例:
'''
{
"requestId": "some_req_id=",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36",
"sourceIp": "176.232..",
"requestTime": "01/Nov/2022:09:25:37 +0000",
"requestTimeEpoch": "1667294737",
"httpMethod": "GET",
"path": "/otherPath",
"status": "500",
"protocol": "HTTP/1.1",
"responseLength": "35",
"domainName": "mydomain.com",
"error_Message": "Internal Server Error",
"integrationErrorMessage": "-",
"integration_Error": "-",
"integrationStatus": "200",
"integration_Status": "-",
"integration_IntegrationStatus": "200",
"integrationLatency": "5"
}
'''
我缺少什么? 为什么很难找到导致错误的原因? 我认为配置很好,但不知何故很难让它工作。 难以置信!