title: AWS API Gateway GET response always cached
body: <blockquote>
    <p>Update: I figured it out, please see the answer post below.</p>
  </blockquote>
  
  <p>I have an AWS API Gateway api defined with various resources and various GET and POST methods.</p>
  
  <p>Everything works mostly fine.
  POSTs are going through.
  GETs return a response (JSON payload) except that the returned value seems to be a <strong>cached</strong> value.</p>
  
  <p>My GET api calls a Lambda function that calls a query to RDS.
  I can confirm my responses are stale because:</p>
  
  <ul>
  <li>When I manually Query the RDS, I get the updated value</li>
  <li>I have Cloud Watch logs enabled and the lambda function does not get called (I believe I have it set up correctly because when I test invoke the lambda, I can get Cloud Watch logs)</li>
  </ul>
  
  <p>It did refresh once, but I think that was because I crossed some (like 1hr) caching threshold or something.</p>
  
  <p>I understand that API Gateway generates a CloudFront behind the scenes.
  And I feel that this is what is doing the caching. But that's just a guess and I have no proof. Maybe some kind of default caching TTL?</p>
  
  <p>I obviously have caching turned off on my API Gateway stage.
  I even tried enabling it, setting the TTL to 1, flushing the cache, and disabling cache again.
  Each stage of that testing still returned the stale values.</p>
  
  <p>I do not know if it is relevant, but additional details:</p>
  
  <ul>
  <li>I have CORS enabled ("*")</li>
  <li>I have Cognito authorizers enabled</li>
  <li>I pass in the JWT token via the Authorization header (this is all working fine)</li>
  </ul>
  
  <p>Is there some header I'm supposed to pass to request an uncached value?
  I went to CloudFront, but here are no configurations there.</p>
  
  <p>All other posts on API Gateway caching seem to be about caching not working or people asking about cache key specificity.
  I haven't seen anything about the value ALWAYS being cached no matter what. So I feel like I'm missing something obvious...</p>
  
  <p>Any help or debugging tips would be much appreciated!</p>