- Newest
- Most votes
- Most comments
To add to Sandhya's observation regarding the console UI behavior: the reason your AWS CLI workaround failed silently is due to an API Gateway backend requirement regarding the endpointAccessMode parameter.
When downgrading a custom domain's security policy from any newer SecurityPolicy_* format back to the legacy TLS_1_2 policy, the API requires you to explicitly unset the endpointAccessMode. If you only pass the securityPolicy modification in your patch operations, the API silently ignores the request. You can bypass the console UI restrictions and fix the existing domain directly by applying both patch operations simultaneously:
aws apigateway update-domain-name \
--domain-name YOUR_CUSTOM_DOMAIN_NAME \
--patch-operations '[{"op":"replace","path":"/securityPolicy","value":"TLS_1_2"},{"op":"replace","path":"/endpointAccessMode","value":""}]'
Once this update is applied, API Gateway will accept the HTTP API mapping.
-
HTTP API Protocol Limitation: AWS HTTP APIs do not support TLS 1.3 security policies for custom domains. They strictly require a TLS 1.0 or TLS 1.2 security policy to function.
-
Immutability of TLS 1.3 Domains: Once an API Gateway custom domain name is created using a TLS 1.3 security policy, AWS does not allow it to be downgraded to TLS 1.2 or TLS 1.0. Because you initialized the domain with SecurityPolicy_TLS13_1_2_2021_06, the TLS 1.2 options are permanently greyed out for that specific resource, and the AWS CLI modification command is silently ignored.
To resolve this and successfully map your HTTP API, you must recreate the custom domain resource:
-
Delete the current custom domain name from API Gateway.
-
Create a new custom domain name using the exact same domain string.
-
During the creation process, select a TLS 1.2 security policy (such as SecurityPolicy_TLS_1_2_2021_01) right from the start.
-
Once the new domain is active, add your API mapping for the HTTP API prod stage. It will link without errors.
Official Reference
- AWS Documentation: (Verify the documentation notes confirming that HTTP APIs only support TLS 1.0/1.2, and that downgrading a domain from TLS 1.3 is unsupported) -> https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-custom-domain-tls-version.html
Thanks for looking into this, Florian. I tried this - I deleted my custom domain name and started a new one from scratch, but got the same results. To be specific, this is what I'm doing in the AWS console: API Gateway > Custom domain names > Add domain name Enter my domain name Leave the defaults: Public, API mappings only, Regional, IPv4, choose Security Policy. I am still seeing the same TLS choices (all SecurityPolicy_TLS13*). At the top it shows TLS_1_2 greyed out with the description "This is a legacy policy. Use a policy that starts with "SecurityPolicy". But under the TLS_1_2 heading, there is one marked SecurityPolicy_TLS13_1_2_2021_06 (has comment "Requires a minimum of TLS 1.2"). So I gave it a try since it was different from the one I tried last time, hoping the comment meant it was compatible with 1.2. Selected my certificate. Click "Add domain name" Configure API mappings Add new mapping Choose my API and stage prod, path empty Click Save Error: You can only map REST APIs to this custom domain name. To map an HTTP API, change the security policy to TLS 1.0 or TLS 1.2. TLS 1.2 policies are all greyed out; the only available policies under TLS 1.3.
Hi, Ken: I tried to replicate your issue in my AWS environment, with HTTP API and custom domain.
First, I created the custom domain with the SecurityPolicy_TLS13_1_2_2021_06, I was able to created the domain successfully, but I could not add the HTTP API with this domain. Then, I update the Security Policy with TLS1.2 and then added the HTTP API, and it worked. Again, to cross check, I tried to update the Security Policy back to TLS13_1_2_2021_06, it gave me this error. Currently, the security policy can not be updated when WebSocket or HTTP APIs are associated to the domain name. TLS 1.2 is the only permitted security for this security policy for these API types.
It's also mentioned on the provided document: API Gateway supports security policies on all APIs. However, you can only choose a security policy for REST APIs. API Gateway only supports the TLS_1_2 security policy for HTTP or WebSocket APIs.
Thank you for trying this, but unfortunately TLS 1.2 is unavailable to me in the security policy dropdown - everything lower than TLS_13 is commented out, either on initial creation or on update.
Relevant content
asked 3 years ago

Thank you, Florian, your trick worked and I am now able to add my API mappings. Thank you!