Receive AccessDenied when trying to access a reload or refresh or one in new tab in angular 5

S3 doesn't understand route open when you reload and open in new tab. You need to tell S3 is for this route used index.html.Whenever new route open its gives 403 [access denied ] error. for this you need to do setting CloudFront to set 403 error page redirect to index.html

enter image description here

enter image description here

Go to aws cloud front and open your configuration then go to Error page tab you will see same as above screenshot

Here is details blog : https://www.internetkatta.com/host-angular-2-or-4-or-5-version-in-aws-s3-using-cloudfront