Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Serverless Workflows with AWS Step Functions

Serverless Workflows with AWS Step Functions

AWS Lambda is stateless, and the execution duration is limited to 15 minutes. So how to implement and coordinate workflows? AWS Step Functions enables you to orchestrate the components of distributed applications.

This talk introduces AWS Step Functions. On top of that, the talk shows some real-world use cases.

Michael Wittig

June 13, 2019

More Decks by Michael Wittig

Other Decks in Technology


  1. • Covers fundamental parts of AWS: EC2, EBS, EFS, S3,

    RDS, DynamoDB, Lambda, VPC, IAM, Auto Scaling, ELB, … • Learn how to build scalable, highly available, or even fault tolerant systems • Focuses on Infrastructure as Code with CloudFormation manning.com or Amazon Book Amazon Web Services in Action 4
  2. • Running your web application on AWS with Docker: ECS

    and Fargate. • Simple to use and fast to implement! • A production-ready infrastructure for everyone. • Including deployment pipeline and Infrastructure as Code. cloudonaut.io/rapid-docker-on-aws/ Book Rapid Docker on AWS 5
  3. “ AWS Step Functions is a web service that enables

    you to coordinate the components of distributed applications and microservices using visual workflows. https:/ /docs.aws.amazon.com/step-functions/latest/dg/welcome.html 2
  4. • Business Process (Onboarding New Customers, …) • Execute a

    container in Fargate • Infrastructure Automation (CloudFormation Drift Detection, …) • Customize Deployment Workflow (ECS Deployment, …) • ... Use Cases 3
  5. 7

  6. • Task • Choice • Fail / Succeed • Pass

    • Wait • Parallel State Types 8
  7. Task Integrations • Activity / worker • AWS Lambda •

    AWS Batch • Amazon DynamoDB • Amazon ECS 9 • Amazon SNS • Amazon SQS • AWS Glue • Amazon SageMaker • External Input
  8. Amazon States Language 12 { "Comment": "An example of the

    Amazon States Language using a choice state.", "StartAt": "FirstState", "States": { "FirstState": { "Type": "Task", "Resource": "arn:aws:lambda:us-east-1:123456789012:function:FUNCTION_NAME", "Next": "ChoiceState" }, "ChoiceState": { "Type" : "Choice", "Choices": [{ "Variable": "$.foo", "NumericEquals": 1, "Next": "FirstMatchState" }], "Default": "DefaultState" }}}
  9. “ Use Step Functions whenever a Lambda function needs to

    wait/poll longer than 15 minutes in the worst case. 13