title: Configure CloudFront to proxy query string as part of S3 object key?
body: <p>We have AWS CloudFront configured to proxy requests onto an S3 bucket.</p>
  
  <p>AWS CloudFront allows you to configure it so that query string params are also proxied onto the origin server (<a href="http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/QueryStringParameters.html" rel="nofollow noreferrer">docs</a>) - we have this configured as well.</p>
  
  <p>The problem I have is that the query string param doesn't appear to be included in the S3 object key lookup.</p>
  
  <p>So for example, we have object keys like:</p>
  
  <ul>
  <li><code>foo</code></li>
  <li><code>foo?a=1</code></li>
  <li><code>foo?b=2</code> </li>
  </ul>
  
  <p>But if we make a request like <a href="https://cf-distro-url.com/foo?a=1" rel="nofollow noreferrer">https://cf-distro-url.com/foo?a=1</a> or <a href="https://cf-distro-url.com/foo?b=2" rel="nofollow noreferrer">https://cf-distro-url.com/foo?b=2</a> we actually end up with the <code>/foo</code> content and not the specific key content.</p>
  
  <p>It looks like maybe CloudFront is proxying on the query string params but they're not used as part of the S3 object key lookup process.</p>
  
  <p>Has anyone experienced this before? and/or know of a solution?</p>
  
  <p>Thanks!</p>