0 votes
in AWS by

Your development team is planning on working with Amazon Step Functions. Which of the following is a recommended practice when working with activity workers and tasks in Step Functions? Choose 2 answers from the options given below.

1 Answer

0 votes
by

Answer - A and C.

The AWS Documentation mentions the following.

By default, the Amazon States Language doesn't set timeouts in state machine definitions.

Without an explicit timeout, Step Functions often relies solely on a response from an activity worker to know that a task is complete.

If something goes wrong and TimeoutSeconds isn't specified, an execution is stuck waiting for a response that will never come.

Executions that pass large payloads of data between states can be terminated.

If the data you pass between states might grow to over 32 KB, use Amazon Simple Storage Service (Amazon S3) to store the data, and pass the Amazon Resource Name instead of the raw data.

Alternatively, adjust your implementation so that you pass smaller payloads in your executions.

Option B is incorrect since States can have multiple incoming transitions from other states.

Because the documentation clearly mentions the best practices, the other options are invalid.

For more information on the best practices, please refer to the below URL-

https://docs.aws.amazon.com/step-functions/latest/dg/sfn-best-practices.html

Amazon Step Functions is a serverless workflow service that allows you to coordinate distributed applications and microservices using visual workflows. As part of using Step Functions, there are certain recommended practices to follow when working with activity workers and tasks.

The recommended practices for working with activity workers and tasks in Step Functions are:

  1. Ensure to specify a timeout in state machine definitions: When defining state machines in Step Functions, it is recommended to specify a timeout value for each state. This helps ensure that the workflow progresses in a timely manner, and if a task takes too long to complete, the state machine will time out and move on to the next state.

  2. If you are passing larger payloads between states, consider using the Simple Storage Service: When passing large payloads between states in Step Functions, it is recommended to use Amazon Simple Storage Service (S3). S3 provides durable object storage and allows you to store and retrieve large amounts of data reliably and at scale. By storing payloads in S3, you can reduce the size of the state machine definition and simplify its maintenance.

Option B, "We can use only 1 transition per state," is not a recommended practice when working with activity workers and tasks in Step Functions. In fact, each state can have multiple transitions, which allows you to define more complex workflows with branching and decision points.

Option D, "If you are passing larger payloads between states, consider using EBS volumes," is not a recommended practice either. EBS volumes are not designed for storing large payloads, and they are not as scalable or durable as S3. Therefore, S3 is the recommended storage service for passing large payloads between states in Step Functions.

...