SERVERLESS 101
Learn with Serverless 101
What is Serverless Computing?
The Benefits of Serverless Computing
What is FaaS?
The Key Considerations when Switching to Serverless
What is Distributed Tracing?
What is AWS X-Ray?
What causes an AWS Lambda cold start?
What is AWS Step Functions?
What are the AWS Lambda Supported Languages?

What is AWS Step Functions?

Living up to their claim of offering the world’s most comprehensive cloud platform, Amazon introduced in late 2016 a new AWS service, Step Functions.

Step Functions is a service which provides a reliable and easy way to orchestrate microservices using visual workflows, mainly by coordinating AWS Lambda functions. As the name implies, it enables developers to set up workflows which step through multiple types of functions that are linked together. The resulting workflow is highly flexible and can be scaled on demand.

Advantages of Step Functions

  • State as a Service in a serverless infrastructure
  • Human tasks can easily be integrated in the orchestration process
  • Maximum duration for a single execution of one year
  • Monitoring using CloudWatch Logs, Metrics, and CloudTrail

Disadvantages of Step Functions

  • Costs can creep up as the application scales
  • Limited control over task orchestration
  • Unique execution name in AWS account from the past 90 days required
  • Limited API calls to Step Functions

From Simple Workflows, to Simpler Step Functions

Why did Amazon find developing Step Functions necessary? Since the introduction of AWS Lambda in 2014, developers have been able to build on-demand applications that are responsive to events and new information. However, they found it difficult to maximize the potential of Lambda functions as there was no simple way of running functions in sequence or parallel, retry functions for a specified number of times, select functions based on data resulted in a previous function, or other similar requirements.

In order to solve these shortcomings, Amazon introduced Step Functions, allowing developers to orchestrate AWS Lambda’s functions and tasks. The Amazon Simple Workflow already provided this functionality, but the fully managed Step Functions service is much easier to use and implement.

All about Step Functions

So far, we’ve seen that Step Functions enables developers to control multiple executions of Lambda functions in order to achieve complex behaviour. This includes running functions in parallel or sequentially, choosing between workflow branches, waiting, or stopping the execution of a function based on the failure rate.

All this is possible as Step Functions offers State as a Service to an otherwise serverless and stateless Lambda function. Step Functions uses states to progress the workflow from one step to the next, coordinating them to run in the right order depending on the results of previous functions.

Pricing

As with all other the other Amazon Web Services, Step Functions features a pay-as-you-go pricing model. Each function is billed for each state transition of the execution. For each account, the first 4,000 transitions per month are included in the free tier.

Using AWS Step Functions

Step Functions can be built and managed in three different ways:

  • AWS Console – Using JSON in the provided Code Box
  • AWS CloudFormation – Using the Infrastructure as a Code service of AWS
  • AWS API & SDK – Using resources such as: CreateStateMachine, GetActivityTask, SendTaskFailure and SendTaskSuccess.

AWS Step Functions Examples and Use Cases

Amazon mention the following use cases for their service, as well as kindly providing a comprehensive list of detailed workflows for SFN:

  • Data processing
  • Automate tasks
  • Untangle business-critical code
  • Application orchestration

We can also look at real-world cases where the system has been implemented successfully:

In order to ensure that their database and website are being constantly updated with the latest prices and product availability, The Take have used Step Functions to create a multi-step automatic product updating system.

Foodpanda say that Step Functions has played a crucial role in enabling them to manage peak times for customer demand, as well as easily change and optimize their service.

Servian has used Step Functions to process customer reviews, focusing on solving negative reviews quickly and proactively. They have created a process in which each review is categorised by metadata, analysed the sentiment of the review using AWS Comprehend, send out notifications and update the review database.

Registration request was sent successfully
GET ALL THE LATEST
NEWS & OPINION