Q87 — AWS SAA-C03 Ch.16

Question 87 of 100 | ← Chapter 16

Q1287. A company runs a content management system on an Amazon Elastic Container Service(Amazon ECS) cluster. The system allows visitors to provide feedback about the company's products by uploading documents and photos of the products to an Amazon S3 bucket. The company has a workflow on AWS that processes uploaded documents to perform sentiment analysis of photos and text. The processing workflow calls multiple AWS services. The company needs a solution to automate the processing workflow. The solution must handle any failed uploads.Which solution will meet these requirements with the LEAST effort?

Correct Answer: D. Use S3 Event Notifications to invoke an Amazon EventBridge rule. Configure the rule to initiate an AWS Step Functions workflow that orchestrates the processing workflow.

Explanation

The correct solution must automate the processing workflow triggered by S3 uploads, handle failed uploads, and require the least operational effort. Let's evaluate each option:Correct Answer: D. Use S3 Event Notifications to invoke an Amazon EventBridge rule. Configure the rule to initiate an AWS Step Functions workflow that orchestrates the processing workflow.Why Option D is Best:Fully Serverless & Automated Workflow:S3 Event Notifications trigger an EventBridge rule, which starts an AWS Step Functions workflow. Step Functions natively handles complex orchestration (calling multiple AWS services for sentiment analysis, error handling, retries, and success/failure notifications). No manual scaling or infrastructure management (unlike EC2 or ECS-based solutions).Built-in Error Handling & Retries:Step Functions provides:Automatic retries for failed steps.Dead-letter queues (DLQ) for unrecoverable failures.Visual debugging of workflow failures.S3 Event Notifications + EventBridge + Step Functions ensure no messages are lost (unlike SQS-based solutions without proper error handling).Least Operational Overhead:No need to manage EC2 instances, ECS clusters, or custom scripts (unlike Options A/B/C). Step Functions is fully managed, reducing maintenance effort.Why Other Options Fail:A. Use S3 Event Notifications to publish events to an Amazon SNS topic. Deploy a web application on the Amazon ECS cluster to subscribe to the SNS topic and listen for events to orchestrate the processing workflow.More Complex & Error-Prone:SNS alone does not guarantee message processing (requires manual acknowledgment handling). The ECS-based web app must implement retries, error handling, and scaling (higher effort than Step Functions).No built-in workflow visualization or debugging (unlike Step Functions). B. Use S3 Event Notifications to publish events to an Amazon SQS queue. Configure long polling. Deploy an Amazon EC2 instance that runs a script to orchestrate the processing workflow.High Operational Overhead:EC2 instance requires manual patching, scaling, and monitoring. The script must handle retries, DLQs, and failures (error-prone and time-consuming).No visual workflow management (unlike Step Functions).C. Use S3 Event Notifications to publish events to an Amazon SQS queue. Create an ECS cluster that scales based on the number of messages in the queue. Configure the cluster to orchestrate the processing workflow.Unnecessarily Complex:ECS scaling adds complexity (cluster management, task definitions, auto-scaling policies). Still requires custom logic for retries and error handling (unlike Step Functions). More expensive than serverless Step Functions for sporadic workloads.Key Comparison:RequirementOption DOther OptionsAutomates workflow with minimal code(Step Functions handles orchestration) (A/B/C require custom logic) Handles failed uploads (retries, DLQs)(Step Functions built-in) (A/B/C require manual implementation) Serverless (no infrastructure management)(EventBridge + Step Functions) (A: ECS; B: EC2; C: ECS) Least operational effort(Fully managed) (A/B/C require scaling, patching, monitoring)Conclusion:Option D is the only solution that:Fully automates the workflow (S3 EventBridge Step Functions).Handles failures gracefully (retries, DLQs, debugging).Requires no infrastructure management (serverless).Final Answer: D