elasticache-alpha: dailyBackupTime field uses misleading Schedule type
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the bug
The alpha elasticache module uses events.Schedule for dailyBackupTime. The expected elasticache type in the Cfn is just a time of day string HH:MM, but schedule is essentially a full cron interface leading to user potentially configuring a bunch of things that are irrelevant to the field.
https://github.com/aws/aws-cdk/blob/67f09c04ad860ff25494e1e76071c304adcf39b4/packages/%40aws-cdk/aws-elasticache-alpha/lib/serverless-cache.ts#L84
Proposal: Create a new helper type to specify time of day or revert back to expect a string on this field with validation in the construct that it matches expected string format.
### Regression Issue
- [ ] Select this option if this issue appears to be a regression.
### Last Known Working CDK Library Version
_No response_
### Expected Behavior
Not to use Schedule type for this field
### Current Behavior
uses overly broad Schedule type
### Reproduction Steps
n/a
### Possible Solution
_No response_
### Additional Information/Context
_No response_
### AWS CDK Library version (aws-cdk-lib)
n/a
### AWS CDK CLI version
n/a
### Node.js Version
n/a
### OS
n/a
### Language
TypeScript
### Language Version
_No response_
### Other information
_No response_
Contributor guide
Research direction
Start at packages/@aws-cdk/aws-elasticache-alpha/lib/serverless-cache.ts around the dailyBackupTime field and inspect how the current events.Schedule type is exposed. Decide between a validated time-of-day string and a narrower helper type, then verify that the field accepts only the intended HH:MM value and no longer exposes unrelated schedule configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100