- Newest
- Most votes
- Most comments
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
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
