The referenced getting started example how to Associate a Domain Name with Your Website Using Amazon Route 53 is using the increasingly preferred approach to host a website on the domain root, likely because it is slightly more involved and support for this via Route 53 Alias Resource Record Sets being worth mentioning/showcasing.
The Amazon S3 developer guide also features an example for Setting Up a Static Website Using a Custom Domain, which is a bit more explicit about the arbitrary choice which of your two buckets will be the redirection target, see Step 2: Create Two Buckets:
In this example, to support requests from both the root domain such as
example.com and subdomain such as www.example.com, you will create two
buckets. One bucket will contain the content and you will configure
the other bucket to redirect requests. [...] [emphasis mine]
All you need to do is to effectively inverse the configuration instructions for example.com vs. www.example.com (starting from step 2.1.3) to redirect requests from the former root domain bucket to the latter instead of the other way round.