Skip to content

Add ability to create AWS::Scheduler::Schedule triggers and specify timezone #11935

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

Merged
merged 32 commits into from
May 17, 2023

Conversation

tie624
Copy link
Contributor

@tie624 tie624 commented Apr 25, 2023

Adds the ability to create AWS::Scheduler::Schedule triggers as an alternative to AWS::Event::Rule, which may be preferable if hitting account-wide limits on number of AWS::Event::Rule triggers per bus (Lambdas are only able to be triggered from the default bus).

Also allows you to specify a timezone to run it on local time.

Unless they need to use inputPath or inputTransformer, developers should be able to just add the method config option and seamlessly migrate to use Scheduler if the devs find themselves up against the account quotas.

Closes: #11680

Replaces: #11707

continues from the work of @joelwalden and @KillDozerX2

@tie624 tie624 marked this pull request as draft April 25, 2023 14:52
@tie624 tie624 marked this pull request as ready for review April 27, 2023 19:18
@tie624
Copy link
Contributor Author

tie624 commented Apr 27, 2023

@medikoo I took the existing PRs and fixed the merged conflicts and filled in any missing holes. I have also tested it and it seems to be working OK. Can you please give it a review when you get a chance?

@joelwalden and @KillDozerX2 this PR includes the work you have done. So feel free to review this as well.

Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

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

@tie624 great thanks for thaking that over, and sorry for late review.

It looks as great direction, please see my comments

@tie624 tie624 requested a review from medikoo May 11, 2023 21:21
@tie624
Copy link
Contributor Author

tie624 commented May 11, 2023

@tie624 great thanks for thaking that over, and sorry for late review.

It looks as great direction, please see my comments

@medikoo I have addressed your comments and made the appropriate changes. Can you please take another look when you can?

Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

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

Thank you @tie624 that looks really good!

I have just a few I believe final suggestions, and we should be good to go 🎉

@tie624 tie624 requested a review from medikoo May 13, 2023 03:38
@tie624
Copy link
Contributor Author

tie624 commented May 13, 2023

Thank you @tie624 that looks really good!

I have just a few I believe final suggestions, and we should be good to go 🎉

@medikoo thanks for the tips and direction. The changes have been made. Please take another look at it.

@tie624
Copy link
Contributor Author

tie624 commented May 13, 2023

I also made the permissions more granular rather than using a wildcard to allow all functions.

Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

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

Thanks for update @tie624. I have just a few last style suggestions

@tie624 tie624 requested a review from medikoo May 15, 2023 18:29
@tie624
Copy link
Contributor Author

tie624 commented May 15, 2023

@medikoo changes made

Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

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

Thank you @tie624 and sorry, there are still few thing which we should improve before merging this in

@tie624 tie624 requested a review from medikoo May 16, 2023 19:22
@tie624
Copy link
Contributor Author

tie624 commented May 16, 2023

@medikoo please take another look.

@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Patch coverage: 98.11% and project coverage change: +0.02 🎉

Comparison is base (bc99c2c) 86.68% compared to head (d3bef57) 86.71%.

❗ Current head d3bef57 differs from pull request most recent head f1885ba. Consider uploading reports for the commit f1885ba to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11935      +/-   ##
==========================================
+ Coverage   86.68%   86.71%   +0.02%     
==========================================
  Files         316      316              
  Lines       13439    13474      +35     
==========================================
+ Hits        11650    11684      +34     
- Misses       1789     1790       +1     
Impacted Files Coverage Δ
commitlint.config.js 0.00% <ø> (ø)
...s/aws/package/compile/events/event-bridge/index.js 97.72% <ø> (ø)
lib/plugins/aws/provider.js 94.78% <ø> (ø)
lib/plugins/aws/package/compile/events/schedule.js 97.82% <97.87%> (-0.48%) ⬇️
lib/plugins/aws/deploy-function.js 96.53% <100.00%> (ø)
lib/plugins/aws/invoke-local/index.js 69.87% <100.00%> (ø)
lib/plugins/aws/lib/naming.js 97.44% <100.00%> (+0.01%) ⬆️
...gins/aws/package/compile/events/cloud-watch-log.js 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

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

Great work @tie624 ! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SLS should be able to create AWS::Scheduler::Schedule events
4 participants