I have a website carloshehe.com in which I host on an S3 bucket. The website is developed using ReactJS. A few days ago, I updated the website by replacing all the files in my bucket and I didn't want to wait 24hours to see the changes so I invalidated everything in the cache via cloudfront with "*" but now I'm getting a 403 access denied error? Everything was working fine before this and the bucket still has public access from the properties. Can someone tell me what is wrong?
Asked
Active
Viewed 345 times
3
-
Can you check your index document and error document is properly set? I am guessing you new code is using some other index document that previous code. – Rafaf Tahsin Jan 15 '20 at 04:54
-
So I'm still a bit new to this, how do I check my error document? All I did was replace the files with the build files created via 'npm run build'. – chacha Jan 15 '20 at 05:22
-
https://imgur.com/1fBu2hA – Rafaf Tahsin Jan 15 '20 at 11:30
-
@RafafTahsin Just checked, it is my index.html file for both the index and error document. This is what I also had before while it was working. – chacha Jan 15 '20 at 16:27
-
have you check your index.html and error page configuration. Invalidation doesnot impact. its only invalidated old files and refresh to new files to serve pages. Try to check this setting mention here. https://stackoverflow.com/questions/50299204/receive-accessdenied-when-trying-to-access-a-reload-or-refresh-or-one-in-new-tab/50302276#50302276 – Avinash Dalvi Jan 16 '20 at 09:58
-
@aviboy2006 Apologies for the late response, I just checked and I don't have any custom error responses set. – chacha Jan 20 '20 at 17:21
-
It’s not about custom error it’s because cloud front doesn’t have idea about routing and index file every time. Try that solution – Avinash Dalvi Jan 20 '20 at 17:28