2

I have deployed an Angular web site to an AWS using an S3 bucket for static web hosting, Route53, an Amazon SSL certificate and cloudfront. The main domain name will work ie "mysite.com" , but if I have a sign on error or refresh a page with for example "mysite.com/auth" or "mysite.com/shops" I get "access denied" and I can not view my site.

The S3 bucket is public access and I have granted public access to all the objects in it.

I have requested an Amazon certificate for this site mysite.com and www.mysite.com and *.mysite.com.

I have created a cloudfront distribution using the certificate created above and added mysite.com and www.mysite.com as alternate domains.

I have use the cloudfront option to create the cname records in Route53.

As mentioned above the domain name mysite.com works but if a path is appended like /auth I get access denied.

This is drivin me mad so any help would be appreciated I am sure the solution is simple but I can not find it anywhere.

Thanks in advance.

Bubbles60
  • 29
  • 1
  • Is there anything special about these paths (such as a different origin)? – Chris Williams Nov 01 '20 at 10:40
  • https://stackoverflow.com/questions/50299204/receive-accessdenied-when-trying-to-access-a-reload-or-refresh-or-one-in-new-tab see this answer help you. Details here https://www.internetkatta.com/host-angular-2-or-4-or-5-version-in-aws-s3-using-cloudfront – Avinash Dalvi Nov 01 '20 at 10:58
  • Wow thanks for your prompt reaction. No nothing special they are using the same origin – Bubbles60 Nov 01 '20 at 11:03
  • Thank you thank you thank you the above reply solved my problem – Bubbles60 Nov 01 '20 at 11:41
  • 1
    Thanks again The reply above was the correct answer https://stackoverflow.com/questions/50299204/receive-accessdenied-when-trying-to-access-a-reload-or-refresh-or-one-in-new-tab – Bubbles60 Nov 01 '20 at 11:44

0 Answers0