API Gateway 中 VPC-Link HTTPS 终端节点的匹配证书

L.H*_*.H. 7 amazon-web-services amazon-ecs amazon-route53 aws-api-gateway

我想在 API Gateway 中将 API 从 HTTP 更改为 HTTPs,但出现以下错误:

Endpoint request headers: {x-amzn-apigateway-api-id=ghqsfz8w25, 
Accept=application/json, User-Agent=AmazonAPIGateway_xxxx, 
Host=xxx-nlb-ecs-service-xxx-xxxcea41.elb.eu-west-1.amazonaws.com, 
X-Amzn-Trace-Id=Root=1-xxx-xxx}
Endpoint request body after transformations: 
Sending request to https://xxx-nlb-ecs-service-xxx-xxxcea41.elb.eu-west-1.amazonaws.com
Execution failed due to configuration error: 
Host name 'vpce-xxx007-xxxb1h.vpce-svc-xxx318ce.eu-west-1.vpce.amazonaws.com' does 
not match the certificate subject provided by the peer (CN=*.domain.eu)
Method completed with status: 500
Run Code Online (Sandbox Code Playgroud)

具有以下配置:

  • 使用通配符证书 *.domain.eu
  • 通配符证书分配给 NLB 443 侦听器
  • NLB 与 VPC Endpoint Services (AWS PrivateLink) 中的 vpce-svc-xxx318ce 终端节点集成
  • 通配符证书分配给 API-GW 中的自定义域
  • 自定义域包括到不同 API 的映射(例如:api.domain.eu/api1v1、api.domain.eu/api2v1)

API方法的设置是

对于 HTTP,此配置可以正常工作。现在看来我需要将VPC端点与通配符证书关联起来。这是我第一次使用 AWS,而且我不是网络专家。有什么想法可以解决这个问题。

提前致谢!

ant*_*mos 4

为了使这项工作顺利进行

  • 使用 ACM 为您控制的私有区域提供证书,例如domain.eu
  • 为 NLB 创建 A 别名记录,例如 vpclink-nlb.domain.eu
  • 更新 NLB 侦听器以使用上述证书
  • 将 API 网关方法集成端点 URL 更新为https://vpclink-nlb.domain.eu