Skip to content
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

Custom schedules #29

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,32 @@ Resources:
CleanScheduledEvent:
Type: Schedule
Properties:
Schedule: rate(1 hour)
Schedule: !Ref CleanSchedule

LogGroup:
Type: AWS::Logs::LogGroup
Properties:
LogGroupName: !Sub /aws/lambda/${Clean}
RetentionInDays: !Ref LogRetentionInDays

Parameters:
CleanSchedule:
Type: String
Description: >-
How frequently to run the janitor, as an EventBridge schedule expression.
https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html
Default: rate(1 hour)

LogRetentionInDays:
Type: Number
Description: >-
How long to retain the execution logs for the janitor.
Default: 14
AllowedValues: [1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, 3653]

VersionsToKeep:
Type: Number
Description: >-
How many versions to keep, even if they are not aliased.
Default: 3
MinValue: 0 # don't keep anything except $Latest
MinValue: 0 # don't keep anything except $LATEST

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed here ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because $LATEST is how AWS names the latest version. They never call it $Latest.