Closed
Conversation
Member
|
This violates the whole point of the resource module, which should just wrap resources within one service. Combine it with the eventbridge module for scheduling, but it can't be in this module. |
Author
|
Thanks for clarifying, I get it. |
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This adds the ability to run a lambda on a schedule, like a cron job. It's very basic at the moment. I'd like to use it as a starting point to even find out if something like this would be considered for the module or if you'd consider it out of scope and inappropriate.
For now I've kept the changes to one file. If this kind of feature is generally acceptable for the module I'll integrate it properly of course.
I'd be happy about any input on making the scheduler more configurable. I could imagine exposing target and retry configuration as variables and offer control over adding a dead letter queue.
This works with a simple lambda in a test setup already. Please let me know if this is worth pursuing and bringing to a level required for inclusion in the module.
Motivation and Context
I (and I assume many others) run lambda functions based on schedules as a cron like tool on AWS. Creating the function is very convenient with this module and I often found myself wanting to just "Give it a cron expression and be done".
The setup needed to run a lambda based on a schedule is repetitive and lends itself well to code reuse, at least for simple cases.
Breaking Changes
No breaking change should be necessary, this only adds at least one new variable and additional resources from providers that are already required for basic functionality.
How Has This Been Tested?
examples/*to demonstrate and validate my change(s)examples/*projectspre-commit run -aon my pull request