Skip to content

API Gateway CreateDomainName returns AccessDenied for ACM certificate

0

API Gateway V2 CreateDomainName for a REGIONAL custom domain in sa-east-1 returns AccessDenied for an ACM certificate. The certificate is Amazon-issued, ISSUED, RSA/SHA-256, and in the same account and region. CloudTrail shows the API Gateway service-linked role successfully calling DescribeCertificate and GetCertificate for that certificate at the time of failure, with no errorCode. The role has the default AWS managed APIGatewayServiceRolePolicy. What other API Gateway validation or account-level restriction can cause this error?

asked a month ago105 views

2 Answers
0

Hello.

Do you have a log of the CreateDomainName event in CloudTrail?
If you do, it might contain detailed error information.
To set up a custom domain in API Gateway, you need the permission "apigateway:AddCertificateToDomain". Is this IAM policy configured?
https://docs.aws.amazon.com/service-authorization/latest/reference/list_apigatewayv2.html
a

EXPERT

answered a month ago

EXPERT

reviewed a month ago

0

AccessDenied during CreateDomainName in API Gateway usually means the ACM certificate cannot be used by API Gateway due to ownership verification or account‑level restrictions. Even if the certificate is issued and in the same region/account, API Gateway requires that the certificate be in ACM, be valid for the custom domain, and (for imported or private CA certs) have an ownershipVerificationCertificateArn.

Please check:

  • Confirm the certificate is Amazon‑issued public ACM certificate in sa-east-1.
  • Ensure the certificate Domain name matches exactly the custom domain (wildcards must align).
  • If using imported or private CA certs, verify the ownership verification certificate is present and valid.
  • Re‑issue the certificate in ACM if necessary, then retry CreateDomainName.
  • Verify the API Gateway service‑linked role exists and is not modified.

https://docs.aws.amazon.com/apigateway/latest/api/API_CreateDomainName.html

https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-custom-domain-names.html

EXPERT

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.