What is AWS Step Functions?
AWS Step Functions is a cloud service that allows developers to create workflows of business-critical processes with a drag-and-drop visual console. It is designed to help organisations integrate multiple AWS services while allowing them to manage each microservice component independently.
In other words, as your business evolves, AWS Step Functions makes it easier to build and scale processes without having to recode the entire application as a whole, line by line, and risking the integrity of the entire application.
But before we get too lost in the details, let’s back up and cover some basics.
What is AWS Step Functions for?
Let’s say you’re running a financial institution or retail chain. Think about all the transactional processes your business needs to render services both internally and to your patrons.
At first glance, processing applications, bookings, inventory orders, or sales transactions seems simple, but these deceptively simple functions involve an intricate orchestration of events—or steps.
These events might involve input from users, writing to a database, pulling data from a database, using logic to determine which step comes next, retrying a step if it fails, and so on. In AWS we can group these events into independent little services—called microservices—and build workflows for them in the AWS Step Functions console.
Since coding these the traditional monolithic way can get complicated, AWS Step Functions’ immediate selling points is the low-code “Workflow Studio” (Figure 1).
This visual console allows developers to see the application workflow they’re building or updating. They can move, modify, and diagnose parts of the workflow using the graphical user interface (GUI) instead of diving headfirst into code.
When should I use AWS Step Functions?
If your business runs multiple AWS services, you can use AWS Step Functions to coordinate them.
This console-like workflow builder makes it easy for anyone familiar with the AWS environment to build and update applications that use a variety of AWS services. This is where AWS Lambda often comes in.
What does AWS Step Functions have to do with AWS Lambda?
Lambda is AWS’s serverless compute service. It allows you to run code for almost any application or backend service, as long as you “supply your code in one of the languages that Lambda supports.”
So what does that have to do with AWS Step Functions?
When you use AWS Step Functions to design an event-driven workflow (also known as a state machine), some of these “states” will run a unit of work from another AWS service. Well, AWS Lambda is one such service, and it’s widely used. You can invoke a Lambda function in the form of a Task-type state and make it part of your workflow.
Are the steps in AWS Step Functions fully automated?
They can be if you need them to be. But they also don’t have to be.
You can include human steps as part of your workflow. For example, you might want your workflow to trigger manual approval as part of the process. You can design the workflow to pause during a certain task and allow it to continue only after the individual entered their approval.
So you can design pretty much any type of workflow you need.
What are the main benefits of AWS Step Functions?
While some companies still have some hesitations—such as (1) Amazon’s proprietary States Language (which is JSON-based, by the way), (2) being locked in with a vendor, or (3) whether decoupling business logic from workflow logic is wise (i.e., by possibly involving people who are not coding experts)—the benefits of AWS, and specifically AWS Step Functions, far outweigh these.
Here’s the benefit shortlist:
- Visual: The visual console makes it easier to design and update your workflows. You can drag and drop and move components around. You can toggle between Graph View, Table View, and Event View and pinpoint errors easily.
- Low-code: The low-code nature is related to the visual aspect of the console. The builder is designed with integration in mind, so it takes care of much of the burden of writing integration code. It helps developers focus on optimising complex business logic without getting lost in the weeds of coding.
- Fast to build and deploy: The visual and low-code benefits combined also help you build and deploy these business workflows quickly. This is excellent, because as your organisation’s or customers’ needs change, you can then update your state machine just as quickly and add more complexity when needed—without making your updates complicated and error-prone!
- Scalable: The nature of AWS is that it scales your processes automatically. As your workloads grow, AWS Step Functions scales automatically.
- Built-in error handling: AWS Step Functions’ build-in retry functionality automatically handles errors and exceptions. You can set it to “respond differently to different types of errors” and make them time-based or event-based.
- Cost savings: Many businesses have saved large sums of money by switching their business-critical processes to AWS. Step Functions pricing is pay per use and bills according to the number of “state transitions.” The free tier allows 4,000 state transitions.
- Observability: AWS Step Functions provides observability, which is great because observability is becoming increasingly important in the technological landscape. The visual console allows developers to effortlessly look “under the hood.” They can troubleshoot without poring over endless lines and lines of code and retrying manually. The Graph view (Figure 2) in the console “displays which states have succeeded, failed, or are currently in programs and any mistakes that have been discovered.”
- Frees up your company’s resources: By removing the need for on-premise computing, AWS Step Functions reduces computing costs, build time, onboarding for engineers, infrastructure maintenance, while increasing the ability to handle large-volume transactions faster and more reliably and at a lower cost.
Who uses AWS Step Functions? Give me some use cases or examples.
Since its debut in 2016, AWS Step Functions has found a home in many industries. Use cases for Step Functions are countless because you can use it for both synchronous and asynchronous business processes.
Large companies with traditional business models (like Liberty Mutual) as well as small, innovative companies (like Freebird) can take advantage of Step Functions. Cryptocurrency exchange platforms, including Coinbase, have also implemented it. Whether it’s processing a credit limit increase or tracking user rewards, Step Functions can get it done.
- Information technology, services, and computer software: This sector still makes up the largest segment of organisations that use Step Functions. One example among many is network monitoring, such as the company Paessler AG.
- Retail: As an example, Zalora, a leading online fashion retailer in Asia, used Step Functions as part of their System Application and Products in Data Processing (SAP) refresh. Since data processing is crucial for every growing business, integrating, scaling, and automating these processes in a serverless way offers the right mix of benefits.
- Financial and insurance services: Financial institutions and insurance companies process a ton of data and provide all kinds of account services to their patrons. From validating accounts to credit limit increase applications to claims filing, these high-volume processes are conducive for cloud migration and, of course, integration through Step Functions.
- Higher education: Colleges and universities have been modernising their administrative operations and student information systems. And many of them do it by migrating to AWS Cloud infrastructure. Since they, too, will have multiple AWS services, they use Step Functions to coordinate them. AWS “can support teaching and learning, connect the campus community, make data-driven decisions to save money and resources, and accelerate research efforts.”
- Pharmaceuticals: Janssen Pharmaceuticals is a prominent example of how pharmaceutical companies can leverage data science and machine learning to better understand their patients’ experience. Janssen parallelized data preparation and orchestrated it using AWS Glue and AWS Step Functions.
- Automotive: Cox Automotive Inc. used Amazon SageMaker (a fully managed machine learning service) and AWS Step Functions to automate model deployment. This allowed them to integrate digital marketing with data science while creating an efficient, accurate workflow.
- Telecommunications: Step Functions can be used in conjunction with Magma, an open-source mobile core network solution. Magma supports LTE, 5G, and Wi-Fi, and other radio technologies, with use cases in mobile private networks, fixed wireless access, and more. AWS Step Functions can be used to orchestrate processes that deploy Magma.
As you can see, AWS Step Functions’ versatility really has no limits. Any place you need to implement or scale data processing and event-driven workflows, AWS Step Functions can step in and simplify business-critical processes in a serverless, scalable way.
AWS Step Functions and the TechRadar by Devoteam
This article is a part of a greater series centred around the technologies and themes found within the first edition of the TechRadar by Devoteam. To read further into these topics, please download TechRadar by Devoteam.
Want to know more about AWS Step Functions?
Check out our TechRadar by Devoteam to see what our experts say about its viability in the market.