AWS S3 bucket hosting: redirect a folder, preserve path

I recently shuffled around some content between web sites I host with AWS S3 and needed to redirect a subdirectory or folder on one domain to the same path on another domain.

Basically, the equivalent of the following with Apache:

Redirect 301 /post https://neilothersite.com/post

Turns out, this is easily possible with S3 redirection rules (XML) as follows:

<RoutingRules>
  <RoutingRule>
    <Condition>
      <KeyPrefixEquals>post/</KeyPrefixEquals>
    </Condition>
    <Redirect>
      <Protocol>https</Protocol>
      <HostName>neilothersite.com</HostName>
    </Redirect>
  </RoutingRule>
</RoutingRules>