在 AWS API Gateway 中使用自定义域 (apex) [英] Use custom domain (apex) in AWS API Gateway

查看:26
本文介绍了在 AWS API Gateway 中使用自定义域 (apex)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为 AWS API 网关端点使用自定义域,这将允许我使用 mydomain.com 而不是 https://xxxxxxxx.execute-api.eu-west-1.amazonaws.com/v1.

I would like to use a custom domain for an AWS API Gateway endpoint, this would allow me to use mydomain.com instead of https://xxxxxxxx.execute-api.eu-west-1.amazonaws.com/v1.

我设法在 API Gateway 中添加了自定义域,但现在我需要设置域的 DNS(该域不是由 Route53 管理的).

I managed to add the custom domain in API Gateway but now I need to set the DNS of the domain (this domain is NOT managed by Route53).

据我所知,我应该设置一个 A 记录,但我没有 Cloudfront 分发提供的任何 IP,它不能是 CNAME,因为我想绑定域(顶点)而不是子域.

As far as I understand I should set an A record but I don't have any IP provided by the cloudfront distribution and it cannot be a CNAME because I want to bind a domain (apex) not a subdomain.

如何在不将 DNS 管理转移到 Route 53 的情况下设置域?

How could I set the domain, without transfering DNS management to Route 53 ?

谢谢

推荐答案

这是不可能的.Route 53 具有特殊功能,允许您将域的顶点别名为另一个 AWS 资源,而无需使用 CNAME 记录 - 这在域的顶点无效.

This is not possible. Route 53 has special capabilities that allow you to alias the apex of a domain to another AWS resource, without using a CNAME record -- which is not valid at the apex of a domain.

您不必将域注册转移到 Route 53——这是可选的——但您必须创建一个托管区域并配置您现有的注册商以使用 Route 53 分配给您的新托管区域的名称服务器作为您的权威名称服务器.是否转移注册本身不会影响性能——当您的域名托管商和注册商是否是两个不同的提供商时,查询既不会变慢也不会变快.

You don't have to transfer your domain registration to Route 53 -- that's optional -- but you do have to create a hosted zone and configure your existing registrar to use the nameservers Route 53 assigns to your new hosted zone as your authoritative name servers. Transferring the registration itself, or not, does not impact performance -- queries are neither slower nor faster when your domain name host and your registrar are two different providers or not.

这篇关于在 AWS API Gateway 中使用自定义域 (apex)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆