Ensure API Gateway caching is enabled
Enabling API caching in Amazon API Gateway to cache your endpoint's responses. With caching, you can reduce the number of calls made to your endpoint and also improve the latency of requests to your API.
Risk Level: Informational
Cloud Entity: AWS ApiGateway Stage
CloudGuard Rule ID: D9.CFT.OPE.21
Covered by Spectral: Yes
Category: Management Tools
GSL LOGIC
AWS_ApiGateway_Stage should have CacheClusterEnabled=true
REMEDIATION
From CFT
Set AWS::ApiGateway::Stage::CacheClusterEnabled to value 'true'
See below example;
Resources:
MyApi:
Type: AWS::ApiGateway::Stage
Properties:
...
CacheClusterEnabled: true
...
References
- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-cacheclusterenabled
- https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html
AWS ApiGateway Stage
A stage is a named reference to a deployment, which is a snapshot of the API. You use a Stage to manage and optimize a particular deployment. For example, you can configure stage settings to enable caching, customize request throttling, configure logging, define stage variables, or attach a canary release for testing. The AWS::ApiGateway::Stage resource creates a stage for a deployment.
Compliance Frameworks
- AWS CloudFormation ruleset
Updated over 1 year ago