Ensure AWS API Gateway caching is enabled
Error: AWS API Gateway caching is disabled
Bridgecrew Policy ID: BC_AWS_GENERAL_128
Checkov Check ID: CKV_AWS_120
Severity: LOW
AWS API Gateway caching is disabled
Description
A cache cluster caches responses. With caching, you can reduce the number of calls made to your endpoint and also improve the latency of requests to your API.
Fix - Runtime
- Go to the API Gateway console.
- Select an API.
- Select Stages.
- In the Stages list for the API, select the required stage.
- Go to the Settings tab.
- Select Enable API cache.
- Wait until cache creation is complete.
Fix - Buildtime
Terraform
resource "aws_api_gateway_rest_api" "example" {
...
+ cache_cluster_enabled = true
...
}
CloudFormation
Resources:
Prod:
Type: AWS::ApiGateway::Stage
Properties:
...
+ CacheClusterEnabled: True
Updated 10 months ago