Implementation of scheduler system able to send event in a future date.
A set of Lambda function connected to EventBridge rules that handle start, stop and task start. Create StepFunction state machine to wait until a specific date and send events.
Using the SAM CLI:
sam build
sam deploy --guided
This application need some parameters when you deploy it:
- EventBusName: The event bus name to connect the integration to.
Send and receive events from and to the configured event bus (from EventBusName
parameter).
All events received and sent require the "id" attribute to identity the correct scheduling configurations.
With cron expression:
{
"Source": "test",
"DetailType": "Schedule Start",
"Detail": {
"id": "test:schedule",
"cron": "30 * * * *"
}
}
Limiting iterations:
{
"Source": "test",
"DetailType": "Schedule Start",
"Detail": {
"id": "test:schedule",
"cron": "30 * * * *",
"limit": 10
}
}
This schedule event will be sent once base on "duration" property:
{
"Source": "test",
"DetailType": "Schedule Start",
"Detail": {
"id": "test:duration-5m",
"duration": "5m"
}
}
{
"Source": "test",
"DetailType": "Schedule Start",
"Detail": {
"id": "test:duration-1h",
"duration": "1h"
}
}
This event will be send when the scheduling time has been reached:
{
"Source": "com.my-stack-name",
"DetailType": "Schedule Tick",
"Detail": {
"id": "test:schedule"
}
}
{
"Source": "test",
"DetailType": "Schedule Stop",
"Detail": {
"id": "test:schedule"
}
}
- Repository badges by Shields.io
- Infrastructure schema by Cloudcraft