aws-samples/cloudfront-authorization-at-edge

custom domain is not redirecting to cognito hosted ui

flkrnr opened this issue · 1 comments

Hi, I have successfully deployed this template. it works like a charm for the XYZ.cloudfront.net domain. It redirects to cognito hosted ui if user is not authenticated.

But when I access the cloudfront resource via a custom domain, the origin s3 content is shown instantly without prior authentication.

Has anyone a clue what the potential misconfiguration could be?

cheers

ok nevermind. I had an old amplify deployment with the same static site with the same domain configured. This It was not extremely obvious bc I already checked the DNS CNAME configs and nslookup also pointed to the correct cloudfront domain. so it was very laborious to track down the source of error.