We where looking for a solution to run cron jobs in our infrastructure and came up with using amazon sns. I implemented it as custom module but it might be helpful as sub-module of amazon_sns for those who need an AWS SNS based cron job and also for others looking for an example implementation on how to use the modules API.

CommentFileSizeAuthor
amazon_sns_cron.zip5.42 KBosopolar

Issue fork amazon_sns-3312099

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

osopolar created an issue. See original summary.

osopolar’s picture

Status: Active » Needs review
deviantintegral’s picture

🤯 that's really neat! And since SNS messages are already authenticated, you don't have to worry about random HTTP requests overloading with cron executions.

We're not actually using this module or SNS on any of our current projects. Would you like maintainer rights on it?

osopolar’s picture

@deviantintegral Thanks for offering maintainer rights. I am not sure, at one hand it's a very simple module and not that complicated, on the other hand I didn't want to care much about amazon sns implementation, just listen for events. If I would be maintainer, I might do some code reviews and otherwise just commit reviewed stuff. On the other hand I still need review of my stuff. If we are together on this, then I could help out here.

deviantintegral’s picture

I've added you to the project - there's no expectations of you at all from our end. If you end up filing issues that don't get review, feel free to merge them after you've used them in production for a bit. You're welcome to open an MR and commit the module as a submodule, and update the project page and README mentioning it.

osopolar’s picture

Thanks. The MR! is there, would be nice to get at least a short review. I will add info in Readme and project page, with the hope that it draws a bit more attention to the module.

berdir’s picture

I agree that putting this in the main setting object is complicated for no good reason, the submodule can have its own config.

To be fair, I don't 100% understand the benefit of going through amazon SNS for this, you still need something to send out the regular notification at some point? I guess you can subscribe N drupal projects to a single topic and run cron at the same time for all of them.

It doesn't strictly need to be in the main project, could also be separate. Without tests, I'm not sure about committing to maintaining this as a maintainer here.