Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

IP address types for HTTP APIs in API Gateway

Focus mode
IP address types for HTTP APIs in API Gateway - Amazon API Gateway
This page has not been translated into your language. Request translation

When you create an API, you specify the type of IP addresses that can invoke your API. You can choose IPv4 to allow IPv4 addresses to invoke your API, or you can choose dualstack to allow both IPv4 and IPv6 addresses to invoke your API. You might want to 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 HTTP APIs is IPv4.

  • If you change the IP address type for an existing API from IPv4 to dualstack, confirm that any policies controlling access to your APIs have been updated to account for IPv6 calls. When you change the IP address type, the change takes effect immediately.

  • Your API can be mapped to a custom domain name with a different IP address type than your API. If you disable your default API endpoint, this might affect how callers can invoke your API.

Change the IP address type of an HTTP API

You can change the IP address type by updating the API’s configuration. You can update the API's configuration by using the AWS Management Console, the AWS CLI, AWS CloudFormation, or an AWS SDK. If you change the API’s IP address type, you don't redeploy your API for the changes to take effect.

AWS Management Console
To change the IP address type of an HTTP API
  1. Sign in to the API Gateway console at https://console.aws.amazon.com/apigateway.

  2. Choose an HTTP API.

  3. For API settings, choose Edit.

  4. For IP address type, select either IPv4 or Dualstack.

  5. Choose Save.

    The change to your API's configuration will take effect immediately.

AWS CLI

The following update-api command updates an API to have an IP address type of dualstack:

aws apigatewayv2 update-api \ --api-id abcd1234 \ --ip-address-type dualstack

The output will look like the following:

{ "ApiEndpoint": "https://abcd1234.execute-api.us-east-1.amazonaws.com", "ApiId": "abcd1234", "ApiKeySelectionExpression": "$request.header.x-api-key", "CreatedDate": "2025-02-04T22:20:20+00:00", "DisableExecuteApiEndpoint": false, "Name": "My-HTTP-API", "ProtocolType": "HTTP", "RouteSelectionExpression": "$request.method $request.path", "Tags": {}, "NotificationUris": [], "IpAddressType": "dualstack" }
To change the IP address type of an HTTP API
  1. Sign in to the API Gateway console at https://console.aws.amazon.com/apigateway.

  2. Choose an HTTP API.

  3. For API settings, choose Edit.

  4. For IP address type, select either IPv4 or Dualstack.

  5. Choose Save.

    The change to your API's configuration will take effect immediately.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.