- Newest
- Most votes
- Most comments
Turns out it was a very simple oversight on my part. I was using the Cognito Domain URI in the CNAME record in Route53 instead of using the Alias Target URI provided when you create a Custom Domain in Cognito. Once I updated Route53 with the Alias Target value for my CNAME record, all was resolved.
answered 2 years ago
The issue you're experiencing with your Cognito custom domain not using the correct ACM certificate is likely due to a propagation delay. When you replace an existing certificate or set up a new one for your Cognito custom domain, it can take up to 1 hour for Amazon Cognito to fully distribute and apply the new certificate.
Here are some steps to ensure everything is set up correctly and to troubleshoot the issue:
-
Verify that your ACM certificate is in the us-east-1 (N. Virginia) region, as this is required for Cognito custom domains.
-
Double-check that the ACM certificate covers the exact domain name you're using (auth.example.com in this case).
-
Ensure that the CNAME record in Route 53 is correctly pointing to the Cognito domain (your-cognito-id.auth.us-east-1.amazoncognito.com).
-
In the Cognito console, confirm that the custom domain settings are using the correct ACM certificate ARN.
-
After making any changes or reassigning the certificate, wait for at least 1 hour before testing again. Cognito needs this time to propagate the certificate changes.
-
Clear your browser cache and try accessing the domain from different networks or devices to rule out any local caching issues.
If after waiting for an hour and following these steps you still encounter the SSL error, it's possible that there might be an underlying issue with the Cognito service. In this case, it would be advisable to open a support ticket with AWS to investigate further.
Remember that when you provide a new certificate to Amazon Cognito (even if it's for the same domain), ACM assigns it a new ARN. Make sure you've updated the Cognito custom domain settings with this new ARN if you've recreated the certificate.
Lastly, ensure that your application is configured to allow Cognito to add cookies to user sessions, as this is a prerequisite for using custom domains with Cognito user pools.
If the issue persists after following these steps and waiting for the propagation period, contacting AWS support would be the next best course of action to resolve the problem.
Sources
Using your own domain for managed login - Amazon Cognito
Delete ACM Cert in Use By CloudFront Distribution after Deleting User Pool | AWS re:Post

It has been almost 48 hours, so it's not simply a waiting for propagation issue.