The first bucket, something-cf-validate-origin-primary-devops, have index.html in the root of the S3 bucket with content,
<html>
<body>
Home page
</body>
</html>
The second bucket, something-cf-validate-origin-failover-devops, have index.html in the root of the S3 bucket.
<html>
<body>
Maintenance page
</body>
</html>
Both the S3 buckets have static web hosting enable and publicly accessible with the endpoint.
Cloudfront Distribution contains two Origins.
Origin group as below,
Behavior is pointing to the Origin group,
Cloudfront's Default Root Object is set to index.html
When I hit the Cloudfront Distribution's Domain Name I am getting the "Home Page".
When I rename index.html to index-disable.html in the first bucket, I should get "Maintenance Page" as because Cloudfront failover should serve the page from second bucket since it got 404 from the first bucket.
But I am getting "Access Denied" when I rename index.html to index-disable.html.


