Amazon S3 bucket does not redirect folder URLs to index.html
CloudFront does not actually have this feature. You can redirect the root object https://www.example.com/ to https://www.example.com/index.html by setting DefaultRootObject, but there's nothing for subdirectories such as https://www.example.com/posts/.

However, you can run arbitrary code on CloudFront using Lambda@Edge, so it's possible for us to add this feature ourselves. With the "origin request" trigger we can rewrite the request to S3, changing /posts/ to /posts/index.html. https://github.com/CloudUnder/lambda-edge-nice-urls has some good handling of paths that works well with Hugo.

Another option is to enable uglyurls in your config so that all links within you site have index.html hardcoded in to them.