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

Create CloudWatch schedule adapter #119

Open
ceilfors opened this issue Jun 20, 2019 · 0 comments
Open

Create CloudWatch schedule adapter #119

ceilfors opened this issue Jun 20, 2019 · 0 comments

Comments

@ceilfors
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
There is no adapter that we can use for cloudwatch cron trigger at the moment

Describe the solution you'd like
When there is no input configured:

const laconia = require("@laconia/core");
const cloudWatchSchedule = require("@laconia/adapter").cloudWatchSchedule();

const app = laconiaContext => {}

exports.handler = laconia(cloudWatchSchedule(app));

When there is an input configured in the schedule (maybe there should be automatic detection, and manual configuration override):

const laconia = require("@laconia/core");
const cloudWatchSchedule = require("@laconia/adapter").cloudWatchSchedule();

const app = (input, laconiaContext) => {
  console.log(input) // automatically parsed if not parsed already
}

exports.handler = laconia(cloudWatchSchedule(app));

Additional context
This request is coming from a short discussion with @Strernd at gitter.

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

No branches or pull requests

1 participant