[Developer] Step Functions Flashcards

(13 cards)

1
Q

What is the primary purpose of AWS Step Functions?

A

To coordinate multiple AWS services into serverless workflows (known as state machines), managing application state, retries, and error handling.

AWS Step Functions simplifies the process of building complex applications by allowing developers to define workflows visually.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the two main types of AWS Step Functions?

A
  • Standard Workflows (ideal for long-running, durable, and auditable processes)
  • Express Workflows (ideal for high-volume, short-duration, and event-driven tasks)

Each type serves different use cases based on workflow duration and processing needs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the maximum duration for a Standard Workflow?

A

1 year

This allows for extensive processes that require long-term execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the maximum duration for an Express Workflow?

A

5 minutes

This is suitable for quick, event-driven tasks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the fundamental building block of an SFN state machine?

A

A State, defined in a JSON-based Amazon States Language (ASL).

States represent the various steps in a workflow.
Examples include Task, Choice, Wait, Succeed, and Fail.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In Step Funtions

What does the Task state do?

A

It performs work by calling an AWS service API

  • Task states are essential for executing specific actions within the workflow.
  • Examples of calling service APIs include invoking a Lambda function or starting a Fargate task.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you handle branching logic (if/then/else) within a Step Functions workflow?

A

Use the Choice state.

The Choice state allows for conditional execution based on input.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How can Step Functions pause a workflow for a specific period of time?

A

Use the Wait state.

This state allows for delays in the workflow execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which SFN feature allows a state to retry a failed task a defined number of times?

A

A Retrier field configured on a Task state, often utilizing exponential backoff and jitter.

This feature helps to manage transient errors effectively.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which SFN feature allows you to handle expected failures by redirecting the workflow to a cleanup or notification state?

A

A Catcher field configured on a Task state.

This allows for graceful error handling in workflows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What SFN feature allows a task to wait for an external service (like a human approval) to complete before proceeding?

A

Callback Patterns using a Task Token, where the external service sends the token back to Step Functions upon completion.

This is useful for workflows that require human intervention.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you ensure that multiple parallel tasks are all completed before the workflow moves to the next state?

A

Use the Parallel state, which executes branches concurrently and waits for the results of all branches to merge.

This state is crucial for optimizing workflow execution time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

When should you choose Express Workflows over Standard Workflows?

A
  1. For high-rate event processing (e.g., streaming data transformation)
  2. when the process needs to complete quickly (under 5 minutes) and intermediate execution history is not strictly required.

This choice is based on the specific needs of the application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly