Vote count: 0
Somehow when I'm using the website URL (I've setup Amazon ACM as well), it works fine but when I try to refresh the page, it throws an error such as:
I'm using a reactJS SPA website to host the website on Cloudfront through S3. I've made the necessary changes on S3 for the permissions:
Bucket Policy:
{
"Version": "2012-10-17",
"Id": "Policy1485855809339",
"Statement": [
{
"Sid": "Stmt1485855807310",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::mydomain.com/*"
}
]
}
I've created two buckets: mydomain.com and www.mydomain.com I've redirected all requests from www.mydomain.com to mydomain.com with the help of S3 redirect.
I've now created a Cloudfront distribution with the help of S3 as the origin and the following configuration:
Please let me know if more information is needed
asked 35 secs ago
S3 and Cloudfront throwing error on page reload
Aucun commentaire:
Enregistrer un commentaire