How to invalidate API Gateway Cache
Jon Bonso2021-05-03T13:34:08+00:00To invalidate an existing cache entry of a request and retrieve the latest data from the integration endpoint, one must send the request together with the Cache-Control: max-age=0 header. If the recipient is authorized to communicate directly to the integration endpoint, then the integration endpoint will respond with the latest data for the request. This also replaces the existing cache entry with the new response. The IAM Policy that grants a client to invalidate the cache follows: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "execute-api:InvalidateCache" ], "Resource": [ "arn:aws:execute-api:region:account-id:api-id/stage-name/GET/resource-path-specifier" ] } ] } An alternative option [...]