[{"data":1,"prerenderedAt":50},["ShallowReactive",2],{"pattern-apigw-cache-sam":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":11,"deploy":13,"description":16,"extension":17,"framework":18,"gitHub":19,"highlight":6,"introBox":25,"language":32,"level":33,"meta":34,"patternArch":35,"resources":40,"s3URL":44,"services":6,"stem":45,"testing":46,"videoId":6,"__hash__":49},"patterns\u002Fpatterns\u002Fapigw-cache-sam.json","Amazon API Gateway with cache enabled",null,{"text":8},[9,10],"1. Delete the stack: \u003Ccode>sam delete --stack-name STACK_NAME\u003C\u002Fcode>.","2. Confirm the stack has been deleted: \u003Ccode>aws cloudformation list-stacks --query \"StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus\"\u003C\u002Fcode>",[12],"content\u002Fcontributors\u002Falbert-blaya.json",{"text":14},[15],"sam deploy --guided","Create a REST API Gateway with a method-level cache","json","AWS SAM",{"template":20},{"projectFolder":21,"repoURL":22,"templateURL":23,"templateFile":24},"apigw-method-cache","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-method-cache","serverless-patterns\u002Fapigw-method-cache","template.yaml",{"headline":26,"text":27},"How it works",[28,29,30,31],"This pattern deploys an Amazon API Gateway REST API endpoint with a method-level cache.","The GET method on the root resource \u002F is enabled with a cache and TTL (Time-To-Live) of 10 seconds.","Any requests made within this 10 second period will be a cache hit and the cached response will be returned by API Gateway immediately without invoking the Lambda integration.","The Lambda integration returns a timestamp in the header so that it is easy to visualize whether a particular response is being returned as a cached response or as a response from the Lambda integration.","Node.js","200",{},{"icon1":36},{"x":37,"y":37,"service":38,"label":39},50,"apigw","API Gateway REST API",{"bullets":41},[42],{"text":16,"link":43},"https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fapi-gateway-caching.html","https:\u002F\u002Fda-public-assets.s3.amazonaws.com\u002Fpatterns\u002Fapigw-cache-sam\u002Fcloudformation.yml","patterns\u002Fapigw-cache-sam",{"text":47},[48],"See the GitHub repo for detailed testing instructions.","-uKjAQoAIg3Y5xdMBJ9ODh9L7wjePa7vCxej4kvzrXg",1778846881578]