You need to run sentiment analysis on one million social media posts using Amazon Comprehend. Which approach will finish processing the dataset in the least amount of time?
Choose an answer
Tap an option to check your answer.
Correct answer: Upload all posts to Amazon S3 and invoke an AWS Lambda function that calls StartSentimentDetectionJob to run an asynchronous batch job on the S3 data..
Why this is the answer
The most efficient approach for processing a large dataset like one million social media posts with Amazon Comprehend is to use its asynchronous batch processing capabilities. Uploading the posts to Amazon S3 and initiating a StartSentimentDetectionJob allows Comprehend to handle the entire dataset as a single, optimized job. This method is designed for high throughput and scalability, minimizing overall processing time. Calling DetectSentiment individually for each post via Lambda and Step Functions would be extremely slow due to the overhead of one million separate API calls. While BatchDetectSentiment improves efficiency by processing up to 25 posts per call, it still requires 40,000 separate API calls for one million posts, which is less efficient than a single asynchronous job. Calling BatchDetectSentiment once with the entire dataset is not possible, as the API has a limit of 25 documents per call.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed