Q73 — AWS SAA-C03 Ch.10

Question 73 of 100 | ← Chapter 10

Q673. A company needs to extract the names of ingredients from recipe records that are stored as text files in an Amazon S3 bucket. A web application will use the ingredient names to query an Amazon DynamoDB table and determine a nutrition score The application can handle non-food records and errors. The company does not have any employees who have machine learning knowledge to develop this solution. Which solution will meet these requirements MOST cost-effectively?

Correct Answer: A. Use S3 Event Notifications to invoke an AWS Lambda function when PutObject requests occur.Program the Lambda function to analyze the object and extract the ingredient names by using Amazon Comprehend. Store the Amazon Comprehend output in the DynamoDB table

Explanation

To meet the requirements of extracting ingredient names from recipe records stored as text files in an Amazon S3 bucket, and do so in the most cost-effective manner without requiring machine learning expertise, the solution that would best fit these criteria is:A. Use S3 Event Notifications to invoke an AWS Lambda function when PutObject requests occur. Program the Lambda function to analyze the object and extract the ingredient names using Amazon Comprehend. Store the Amazon Comprehend output in the DynamoDB table.Here's the rationale behind this solution:Option A: Use S3 Event Notifications to invoke an AWS Lambda function when PutObject requests occur. Program the Lambda function to analyze the object and extract the ingredient names using Amazon Comprehend. Store the Amazon Comprehend output in the DynamoDB table. By using S3 Event Notifications, you can trigger an AWS Lambda function whenever a new object is added to the S3 bucket. The Lambda function can then use Amazon Comprehend, a natural language processing (NLP) service, to analyze the text and extract the ingredient names from the recipe records. The extracted ingredient names can be stored in a DynamoDB table, which can be queried by the web application to determine a nutrition score.This solution is cost-effective because it leverages AWS Lambda, which has a pay-per-use pricing model based on the number of invocations and the execution time. Amazon Comprehend is also a cost-efficient NLP service. Additionally, it eliminates the need for machine learning expertise as Amazon Comprehend provides pre-trained models for text analysis.Option B: Use an Amazon EventBridge rule to invoke an AWS Lambda function when PutObject requests occur. Program the Lambda function to analyze the object using Amazon Forecast to extract the ingredient names. Store the Forecast output in the DynamoDB table.Amazon Forecast is a service for time series forecasting and is not specifically designed for text analysis or extracting ingredient names from recipe records. Using Amazon Forecast for this use case would be less efficient and more costly compared to using Amazon Comprehend.Option C: Use S3 Event Notifications to invoke an AWS Lambda function when PutObject requests occur. Use Amazon Polly to create audio recordings of the recipe records. Save the audio files in the S3 bucket. Use Amazon Simple Notification Service (Amazon SNS) to send a URL as a message to employees. Instruct the employees to listen to the audio files and calculate the nutrition score. Store the ingredient names in the DynamoDB table.This option involves creating audio recordings of the recipe records using Amazon Polly and then relying on employees to listen to the audio files and manually calculate the nutrition score. It introduces unnecessary complexity, manual effort, and potential errors. It is also not a direct solution for extracting ingredient names from the text files.Option D: Use an Amazon EventBridge rule to invoke an AWS Lambda function when a PutObject request occurs. Program the Lambda function to analyze the object and extract the ingredient names using Amazon SageMaker. Store the inference output from the SageMaker endpoint in the DynamoDB table. Amazon SageMaker is a powerful machine learning service, but it requires machine learning expertise to train and deploy models. Using SageMaker for this specific use case would be overkill and less cost- effective compared to using Amazon Comprehend, which is specifically designed for text analysis.Therefore, the most cost-effective solution that meets the requirements is to use S3 Event Notifications to invoke an AWS Lambda function, program the Lambda function to analyze the object and extract the ingredient names using Amazon Comprehend, and store the Comprehend output in the DynamoDB table (Option A). This solution leverages serverless services, eliminates the need for machine learning expertise, and keeps the cost optimized by leveraging pay-per-use pricing models for Lambda and Comprehend.