Which combination of steps should the solutions architect take to meet these requirements?
(Choose three.)
Create an Amazon Simple Notification Service (Amazon SNS) topic with a subscription of type “Email” that targets the team’s mailing list.
Create a task named “Email” that forwards the input arguments to the SNS topic.
Add a Catch field to all Task, Map, and Parallel states that have a statement of “ErrorEquals”: [ “States.ALL” ] and “Next”: “Email”.
Add a new email address to Amazon Simple Email Service (Amazon SES). Verify the email address.
Create a task named “Email” that forwards the input arguments to the SES email address.
Add a Catch field to all Task, Map, and Parallel states that have a statement of “ErrorEquals”: [ “States.Runtime” ] and “Next”: “Email”.
Explanations:
Creating an SNS topic and subscribing a mailing list to it is the standard way to send notifications to a group of people. This sets up the notification channel.
Creating a “Email” task that publishes to the SNS topic connects the Step Function workflow to the notification channel. This task will be executed when a failure is caught.
TheCatchfield in Step Functions is used to handle errors. Setting”ErrorEquals”: [ “States.ALL” ]ensures thatalltypes of errors are caught, fulfilling the requirement to be notified ofallfailures. The”Next”: “Email”part specifies that the “Email” task (which sends the notification) should be executed if an error is caught.
While SES can be used for sending emails, it’s not the most straightforward approach for Step Functions. SNS is better integrated with Step Functions for notifications. This adds unnecessary complexity.
Similar to D, using SES directly from Step Functions is more complex than using SNS. Step Functions has a direct integration with SNS for notifications. Using SES would require custom Lambda functions or other integrations.
“States.Runtime”only catches runtime errors. It does not catch other types of errors, such asStates.TaskFailed,States.Timeout, or custom errors. The requirement is to be notified ofallfailures, so”States.ALL”is required.