-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws-secretsmanager: Cannot set rotation schedule to be less than a day #28261
Comments
I guess this is because current implementation is to satisfy AutomaticallyAfterDays which the unit is day but it's still possible to implement it with aws-cdk/packages/aws-cdk-lib/aws-secretsmanager/lib/rotation-schedule.ts Lines 139 to 141 in 89f9803
|
Allows to set hourly rotation up to 4 hours on secrets as per [official docs](https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_managed.html). Closes #28261. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Describe the bug
AWS secrets manager documentation, says that "You can rotate a secret as often as every four hours". However if I want to do something like:
I will get the following error:
Expected Behavior
I would expect CDK to allow me to create schedules for 4 hours, as described in the documention.
Current Behavior
I can only rotation schedules for the minimum of 1 day.
Reproduction Steps
Try to synth this stack:
Possible Solution
I suppose this is related to the fact that when checking if the provided duration is greater than 1000 days we are directly calling
.toDays
which validates wether the given value can be converted in a whole number of days.Additional Information/Context
No response
CDK CLI Version
2.113.0 (build ccd534a)
Framework Version
No response
Node.js Version
v21.3.0
OS
MacOs
Language
TypeScript
Language Version
Version 5.1.6
Other information
No response
The text was updated successfully, but these errors were encountered: