Giter VIP home page Giter VIP logo

aws-step-functions-processing's Introduction

stepfunctions2processing

Configuration with AWS step functions and lambdas which initiates processing from activity state

Motivation

Currently AWS Step Function service provides the best way to unite together serverless processing and cluster processing. Serverless processing can be extremely useful for the cases when you need to have a very good scalability or cheap processing. But for the long or CPU heavy processing you may still need to use cluster. The current version of step function expects cluster (except for ECS and Batch) to make requests to the Step Function activity. For clusters with extremely expensive machines it may not be the best way for handling so this project allows to transform activity state into active processing trigger. Examples here also include AWS Batch and AWS Fargate

TL;DR: Project allows to initiate processing from AWS Step function instead of making state requests towards it.

Examples

AWS Lambda example

Scheme

Image

  1. Step function process starts and input data is provided to lambda
  2. Lambda processes data and produces json output which is then given to the activity.
  3. Checker lambda makes regular requests to the activity in case activity is in "ActivityScheduled" state.
  4. Activty returns token and input json.
  5. Checker lambda initiates processing lambda which takes token and input json as input.
  6. Processing lambda conducts processing part and return token and output json to activity.
  7. Step functions provides output json from the activity as output

AWS Fargate example

How to deploy

  1. Push docker image into ECR (https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-push-ecr-image.html)
  2. Update serverless.yml with image name and instance parameters
  3. Install and configure serverless (https://serverless.com/framework/docs/providers/aws/guide/installation/)
  4. Install plugins serverless-step-functions and serverless-pseudo-parameters
  5. Run serverless deploy

Scheme

Image

AWS Batch example

How to deploy

  1. Push docker image into ECR (https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-push-ecr-image.html)
  2. Update serverless.yml with image name and instance parameters
  3. Install and configure serverless (https://serverless.com/framework/docs/providers/aws/guide/installation/)
  4. Install plugins serverless-step-functions and serverless-pseudo-parameters
  5. Run serverless deploy

Scheme

Image

Tools

Project utilises serverless framework with plugin for step functions for orchestration and deployment of the application.

References

Next steps

  • Add AWS Batch processing example
  • Add AWS Fargate processing example
  • Create example for deep learning/machine learning training processes

aws-step-functions-processing's People

Contributors

ryfeus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.