aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
[AWS::ApiGateway::Stage] - [BUG] - caching remains enabled after removal, potentially returning wrong data
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
### Name of the resource
AWS::ApiGateway::Stage
### Resource Name
_No response_
### Issue Description
Removing the cache_enabled and cache_cluster_enabled settings from stage deployment options does not disable caching, as is the default behavior, despite cdk diff output suggesting it would be removed.
Side note: When trying to disabe caching entirely, the caching keys configuration might be removed at the same time. In this case, due to this bug, caching remains enabled but the caching keys are not respected anymore, which leads to caching/delivery of randomly **wrong data** to clients, causing havoc and mayhem.
### Expected Behavior
The resource is configured just like it would be when it is initially created with the given template. (caching is disabled)
### Observed Behavior
The resource is configured differently from how it would be initially created with the given template. (caching is enabled)
### Test Cases
For complete details and test case, please refer to https://github.com/aws/aws-cdk/issues/32342. Your colleagues asked me to create this issue here, as they suggest the root problem is with CFn, so I'm just relaying their message.
### Other Details
_No response_
Contributor guide
Research direction
Start with the complete test case in the linked aws/aws-cdk issue and compare the AWS::ApiGateway::Stage behavior before and after removing cache_enabled and cache_cluster_enabled. The issue provides no repository files or local entry point; done means caching is disabled after those settings are removed, matching a newly created resource and preventing stale or incorrect responses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100