Skip to content

Create CloudWatch schedule adapter #119

@ceilfors

Description

@ceilfors

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions