When you create an custom domain name, you specify the type of IP addresses that can invoke your domain. You can choose IPv4 to allow IPv4 addresses to invoke your domain, or you can choose dualstack to allow both IPv4 and IPv6 addresses to invoke your domain. We recommend that you set the IP address type to dualstack to alleviate IP space exhaustion or for your security posture. For more information about the benefits of a dualstack IP address type, see IPv6 on AWS.
Considerations for IP address types
The following considerations might impact your use of IP address types.
-
The default IP address type for API Gateway custom domain names is IPv4.
-
Your custom domain name doesn't need to have the same IP address type for all APIs mapped to it. If you disable your default API endpoint, this might affect how callers can invoke your API.
Change the IP address type of custom domain name
You can change the IP address type by updating the domain name's endpoint configuration. You can update the endpoint configuration by using the AWS Management Console, the AWS CLI, AWS CloudFormation, or an AWS SDK.
To change the IP address type of a custom domain name
Sign in to the API Gateway console at https://console.aws.amazon.com/apigateway
. Choose a public custom domain name.
Choose Endpoint configuration.
For IP address type, select either IPv4 or Dualstack.
Choose Save.