JitterType

class aws_cdk.aws_stepfunctions.JitterType(value)

Bases: Enum

Values allowed in the retrier JitterStrategy field.

ExampleMetadata:

infused

Example:

parallel = sfn.Parallel(self, "Do the work in parallel")

# Add branches to be executed in parallel
ship_item = sfn.Pass(self, "ShipItem")
send_invoice = sfn.Pass(self, "SendInvoice")
restock = sfn.Pass(self, "Restock")
parallel.branch(ship_item)
parallel.branch(send_invoice)
parallel.branch(restock)

# Retry the whole workflow if something goes wrong with exponential backoff
parallel.add_retry(
    max_attempts=1,
    max_delay=Duration.seconds(5),
    jitter_strategy=sfn.JitterType.FULL
)

# How to recover from errors
send_failure_notification = sfn.Pass(self, "SendFailureNotification")
parallel.add_catch(send_failure_notification)

# What to do in case everything succeeded
close_order = sfn.Pass(self, "CloseOrder")
parallel.next(close_order)

Attributes

FULL

Calculates the delay to be a random number between 0 and the computed backoff for the given retry attempt count.

NONE

Calculates the delay to be the computed backoff for the given retry attempt count (equivalent to if Jitter was not declared - i.e. the default value).