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

(events): L2 for EventBridge Scheduler #23394

Closed
2 tasks
tmokmss opened this issue Dec 19, 2022 · 22 comments
Closed
2 tasks

(events): L2 for EventBridge Scheduler #23394

tmokmss opened this issue Dec 19, 2022 · 22 comments
Labels
@aws-cdk/aws-events Related to CloudWatch Events effort/large Large work item – several weeks of effort feature-request A feature should be added or improved. p1

Comments

@tmokmss
Copy link
Contributor

tmokmss commented Dec 19, 2022

Describe the feature

EventBridge Scheduler was released on 2022/11. It is basically a powerful version of the existing EventBridge scheduled rules, with more scalability, timezone support, time window schedules, etc. Introducing Amazon EventBridge Scheduler

It would be great if we have a user friendly interface for this resource just like the existing L2 constructs in aws-events module. CloudFormation reference is here.

NOTE: L1 constructs are already available: doc

Use Case

It will improve most of the use cases that currently use EventBridge scheduled rules.

Proposed Solution

No response

Other Information

The RFC process is completed: aws/aws-cdk-rfcs#486

See the referenced PRs to check the progress of implementation.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.52.0

Environment details (OS name and version, etc.)

n/a

@tmokmss tmokmss added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 19, 2022
@github-actions github-actions bot added the @aws-cdk/aws-events Related to CloudWatch Events label Dec 19, 2022
@mascur
Copy link
Contributor

mascur commented Dec 20, 2022

Hi @tmokmss,

Thank you for this feature request! I think this would be a great addition! If you would like to contribute then you'll need to submit an RFC first because this is a new L2 construct.

I've marked this issue as a p2. We most likely won't be able to get to this issue. However, if you or another community member would like to submit a PR we might be able to review that. You can refer to the Contribution Guide here to get started.

We use +1s to help prioritize our work, and are happy to revaluate this issue based on community feedback. You can reach out to the cdk.dev community on Slack to solicit support for reprioritization.

@mascur mascur added p2 effort/large Large work item – several weeks of effort and removed needs-triage This issue or PR still needs to be triaged. labels Dec 20, 2022
@yaojiach
Copy link

yaojiach commented Jan 2, 2023

+1

1 similar comment
@yaojiach
Copy link

yaojiach commented Jan 2, 2023

+1

@filletofish
Copy link
Contributor

Hey all, have started a RFC for this construct: aws/aws-cdk-rfcs#474.

@wilhen01
Copy link
Contributor

+1!

@anamariad
Copy link

+1

@vitaliknet
Copy link

+1

@github-actions github-actions bot added p1 and removed p2 labels Mar 12, 2023
@github-actions
Copy link

This issue has received a significant amount of attention so we are automatically upgrading its priority. A member of the community will see the re-prioritization and provide an update on the issue.

@toshitanaa
Copy link

+1

2 similar comments
@ElliotWhiley
Copy link

+1

@andriimykhailovsumup
Copy link

+1

@filletofish
Copy link
Contributor

Hi all,

RFC for L2 EB Scheduler Constructs was approved by bar-raiser. We are currently waiting for community feedback until April 19th. Please do take a look if interested.

aws/aws-cdk-rfcs#486

mergify bot pushed a commit that referenced this issue May 17, 2023
This PR contains implementation of Schedule Expression. While a schedule is the main resource in Amazon EventBridge Scheduler, this PR adds schedule expression class schedule  expression on which schedule depends.

Every schedule has a schedule expression that determines when, and with what frequency, the schedule runs. EventBridge Scheduler supports three types of schedules: rate, cron, and one-time schedules. When you create a schedule, you configure a target for the schedule to invoke. 

To reuse existing `events.Schedule` functionality, class `ScheduleExpression`  uses it to generate schedule expression strings. 

Implementation is based on RFC: https://github.com/aws/aws-cdk-rfcs/blob/master/text/0474-event-bridge-scheduler-l2.md

Advances #23394

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@meowsick
Copy link

+1

@roshni06
Copy link

Hi what is the status of this feature? When will this be merged?

@bharatjoshi11
Copy link

Hey everyone.
I want to create eventbridge scheduler using golang is there any sdk available for that?

mergify bot pushed a commit that referenced this issue Jun 29, 2023
This PR contains implementation of ScheduleTargetInput. While a schedule is the main resource in Amazon EventBridge Scheduler, this PR adds ScheduleTargetInput on which ScheduleTargetBase depends.

Every Schedule has a target that determines what extra information is sent to the target when the schedule is triggered. Also 4 ContextAttributes can be used that will be resolved at trigger-time.

To be able to create sensible unit tests, also the a start is made to add the `Schedule` and the `LambdaInvoke` target as described in the RFC.

Implementation is based on RFC: https://github.com/aws/aws-cdk-rfcs/blob/master/text/0474-event-bridge-scheduler-l2.md

Also added a small fix to 2 of the unit tests of the previous PR for this module.

Advances #23394

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
mergify bot pushed a commit that referenced this issue Jul 24, 2023
This PR contains implementation of ScheduleGroup. 

A Schedule is the main resource in Amazon EventBridge Scheduler, this PR adds ScheduleGroup which can be used to group Schedules and on which Schedule depends.

Every AWS account comes with a default group for schedules. Customers can also create a custom groups to organise schedules that share a common purpose or belong to the same environment. 

Schedule has a property `group` that determines what group is the schedule associated with.

To be able to test adding schedules to the group I have added property `group` to private class `Schedule` and used `Lazy` functionality to be able to update `group` of the schedule dynamically. 

Implementation is based on RFC: https://github.com/aws/aws-cdk-rfcs/blob/master/text/0474-event-bridge-scheduler-l2.md

Advances #23394

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
bmoffatt pushed a commit to bmoffatt/aws-cdk that referenced this issue Jul 29, 2023
This PR contains implementation of ScheduleGroup. 

A Schedule is the main resource in Amazon EventBridge Scheduler, this PR adds ScheduleGroup which can be used to group Schedules and on which Schedule depends.

Every AWS account comes with a default group for schedules. Customers can also create a custom groups to organise schedules that share a common purpose or belong to the same environment. 

Schedule has a property `group` that determines what group is the schedule associated with.

To be able to test adding schedules to the group I have added property `group` to private class `Schedule` and used `Lazy` functionality to be able to update `group` of the schedule dynamically. 

Implementation is based on RFC: https://github.com/aws/aws-cdk-rfcs/blob/master/text/0474-event-bridge-scheduler-l2.md

Advances aws#23394

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@weijiany
Copy link

weijiany commented Aug 4, 2023

+1
aws-cdk version 2.83.1 doesn't support. 😢

mergify bot pushed a commit that referenced this issue Aug 27, 2023
This PR contains implementation for Schedule Targets:

1. Creates a separate module for targets
2. Support imported resources, but not cross account, cross region resources as we discussed in RFC. The unit tests should cover 4 cases (target and role within the same stack, target is imported, role is imported, target and role are imported), 
3. I have moved out class `Schedule` from private package to depend on it in `schedule-targets` unit tests. 

Implementation is based on RFC: https://github.com/aws/aws-cdk-rfcs/blob/master/text/0474-event-bridge-scheduler-l2.md

Advances #23394

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
mergify bot pushed a commit that referenced this issue Sep 29, 2023
Continuing @Jacco work from #26268 

Currently we were second-guessing if the implementations of ScheduleExpression and ScheduleTargetInput generate valid and correct CloudFormation.

This integration test verifies that lambda invoke target is invoked:
- A schedule is deployed that triggers a Lambda every minute after deployment.
- The function adds a Tag to itself Key=OutputValue Value=base64 of the JSON string made of the input event
- An assertion is made that checks for 10 minutes if the expected Tag appears


Advances #23394

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@filletofish
Copy link
Contributor

@WtfJoke
Copy link
Contributor

WtfJoke commented Oct 9, 2023

For completeness:
11. (aws-scheduler-targets-alpha): Add StepFunctionsStartExecution #27377

And the corresponding PR #27424

@filletofish
Copy link
Contributor

filletofish commented Oct 14, 2023

One more subtask is to support customer-managed KMS Keys in Schedules - #27543

@filletofish
Copy link
Contributor

Also tracking feature to override target properties in #27545

mergify bot pushed a commit that referenced this issue Oct 18, 2023
Class Schedule now provides static methods for accessing all schedules metrics with default configuration, such as `metricAllErrors` for viewing errors when executing targets.

Advances #23394

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@kaizencc
Copy link
Contributor

I am going to close this as completed. We have a full-blown alpha module and targets now for eventbridge scheduler. all additional work can be tracked individually, we have followed through on the ask for an L2 for EventBridge. Lets create new issues for any feature requests and bug fixes and go from there! Excited to see this one in.

Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-events Related to CloudWatch Events effort/large Large work item – several weeks of effort feature-request A feature should be added or improved. p1
Projects
None yet
Development

No branches or pull requests