title: AWS Cloudfront distro to redirect to s3 static website redirects
body: <p>I have hosted a s3 static website with multiple redirects. Below is the redirect</p>
  <p>I am using Cloudfront to backed this website so that I can use https redirection. Lets say the address for the CF is mys3host.com.</p>
  <p>Can I use Clodfront so that when I pass <a href="https://mys3host.com/AccountA" rel="nofollow noreferrer">https://mys3host.com/AccountA</a>, it redirects accordingly to AccountA, B and so on.</p>
  <pre><code>   [
      {
          &quot;Condition&quot;: {
              &quot;KeyPrefixEquals&quot;: &quot;/AccountA&quot;
          },
          &quot;Redirect&quot;: {
              &quot;ReplaceKeyPrefixWith&quot;: &quot;/Bond/AccountA.html&quot;
          }
      },
      {
          &quot;Condition&quot;: {
              &quot;KeyPrefixEquals&quot;: &quot;/AccountB&quot;
          },
          &quot;Redirect&quot;: {
              &quot;ReplaceKeyPrefixWith&quot;: &quot;/Bond/AccountB.html&quot;
          }
      },
      {
          &quot;Condition&quot;: {
              &quot;KeyPrefixEquals&quot;: &quot;/AccountC&quot;
          },
          &quot;Redirect&quot;: {
              &quot;ReplaceKeyPrefixWith&quot;: &quot;/Bond/AccountC.html&quot;
          }
      }
  ]
  </code></pre>