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

Add support for lambda scheduling #3

Open
DaJackkal opened this issue Apr 4, 2021 · 1 comment
Open

Add support for lambda scheduling #3

DaJackkal opened this issue Apr 4, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@DaJackkal
Copy link

@andreujuanc andreujuanc self-assigned this Apr 4, 2021
@andreujuanc andreujuanc added the enhancement New feature or request label Apr 4, 2021
@andreujuanc andreujuanc added this to the v1 milestone Apr 4, 2021
@andreujuanc
Copy link
Member

Even if the underlying implementation of the rules and the scheduling might be too similar. I would keep it separate in terms of the exposed lambada API.

Like this:

run(...., {
     cron: [
           (context)=> {
                 name: "that-batch-job-that-needs-constant-love",
                 rate: "10 minutes",
                 handler: (event) => 1 + 1
           }
     ]
})

Behind the scenes we can do:

   aws.cloudwatch.onSchedule(
        `${cronjobname}-${environment}`,
        `rate(${rate})`,
        handler
    )

Tho, this implementation would be the least malleable.

It is also possible to create it using Pulumi.Aws.CloudWatch.EventRule https://www.pulumi.com/docs/reference/pkg/aws/cloudwatch/eventtarget/

I would need to dig into the aws docs to see how that works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants