Skip to content

AWS-T8/Task-Scheduler-Orchestrator-Library

Repository files navigation

AWS-T8

Task Scheduler & Orchestrator Library

Team ID: AWS-T8 | Team Members: Sanskar Agarwal & Saksham Arora

IntroductionKey FeaturesHow To UseTech StackDocumentation Video Snapshots

Introduction

The aim of our project is to create a Task Scheduler, that takes in a task in the form of a link to AWS lambda function & executes it on the specified time, & an Orchestrator that can schedule an orchestration. The orchestrator schedules a set of tasks collectively. These tasks are executed in a sequential manner, & after the successful execution of each task a condition check task is executed.
Why do we need this?
Basically companies have multiple workflows that consist of a set of asynchronous tasks that need to be scheduled and executed based on events or other triggers. This is where a task orchestrator and scheduler comes in handy.
Here we expose an API through which users can schedule the tasks & modify them.

Key Features

  • Secure API Authorization using JWT
  • Takes in Lambda URL & schedules it on the specified time.
  • Users can cancel or modify the task before the start of it’s execution.
  • Executes a task with an accuracy of under 1 second.
  • Retries task specified number of times upon failure of Lambda function (4xx or 5xx response code).
  • Supports creation of orchestrations for any number of tasks.
  • Users can cancel and modify the orchestration before the start of it’s execution.
  • Supports creation of Lambda functions using regular javascript or python functions. Returns the trigger URL of the created lambda function in response & schedules it.

How To Use

To clone and run this application, you'll need Git and Docker. From your command line:

# Clone this repository
$ git clone https://github.com/Crio-Winter-of-Doing-2021/AWS-T8.git

# Go into the repository
$ cd AWS-T8

# To create the docker images
$ chmod +x setup.sh
$ sudo ./setup.sh

# To start the scheduler & orchestrator(run docker images as containers)
$ chmod +x start.sh
$ sudo ./start.sh

# To stop the docker images
$ chmod +x stop.sh
$ sudo ./stop.sh
  • API runs on port : 3000
  • Frontend runs on port : 3001
  • Make .env file in all folders having same format as specified in sample-env.
  • Create an IAM User Role with following policies
    • AWSLambdaBasicExecutionRole
    • PowerUserAccess
    • IAMFullAccess
    • AWSLambda_FullAccess
  • Go to backend_apiContract and fill the Access Key ID and Secret Access Key in Dockerfile & aws_configure_expect.sh

Tech Stack

Snapshots

Schedule a Task

Schedule an Orchestration

Create a Lambda