12-08-2018, 07:55 PM
(10-08-2018, 07:57 PM)) phanikumar Wrote: Now, If I refresh my browser, I am getting 404 error instead of existing page. I deployed the similar application in ECS and EC2 as well where I am able to refresh the page without any errors. Is there any solution for this.
Hello Phani. It appears the problem you are having is related to the inability of Cloudfront/S3 to redirect to the index page by default (Default Directory Indexes) when you call the domain name in the distribution for folders other than the root folder.
You can solve this by configuring a lamda function to ensure the redirect is always happening to load the default index page. Below is the link that will help you do this.
https://aws.amazon.com/blogs/compute/imp...ambdaedge/
However, if it is still giving you a 404 when the link in the address bar shows the index page, then ensure that the Cloud distribution and S3 bucket policies are configured correctly.