我正在尝试使用
更新从EDGE到REGIONAL的基本路径映射aws apigateway update-domain-name --region eu-west-2 --domain-name example.com --patch-operations op=replace,path=/endpointConfiguration/types/EDGE,value=REGIONAL
但是我得到了
An error occurred (BadRequestException) when calling the UpdateDomainName operation: /endpointConfiguration/types/EDGE Invalid request input
https://docs.aws.amazon.com/apigateway/api-reference/link-relation/domainname-update/处的文档指定/endpointConfiguration/types
是有效且可更新的路径,但我尝试过的所有变体都无效。
答案 0 :(得分:2)
对于您的域名,您必须首先添加REGIONAL类型,这将使您处于安全迁移状态,其中存在两个端点,您可以将DNS从EDGE域名转换为REGIONAL域名(在您之后的响应中提供)添加REGIONAL端点类型。您还需要分别添加区域ACM证书(即使它将是相同的ACM ARN)。
aws apigateway update-domain-name --region eu-west-2 --domain-name example.com \
--patch-operations \
op="add",path="/endpointConfiguration/types",value="REGIONAL" \
op="add",path="/regionalCertificateArn",value="<ARN>"
将DNS安全地翻转到区域域名后,您可以删除EDGE端点类型。