MLA-C01 Question 207
Select 2You are working on a machine learning project where you need to preprocess large volumes of text data stored in an S3 bucket. The preprocessing involves tokenization, removing stop words, and stemming. You want to implement a scalable and serverless solution using AWS services. Which combination of services should you use to achieve this?
- A
AWS Glue for data processing and Amazon SageMaker for model training
- B
Amazon Kinesis for real-time data processing and AWS Lambda for preprocessing
- C
AWS Step Functions to orchestrate AWS Lambda functions for preprocessing tasks
- D
Amazon Comprehend for tokenization and stop word removal, along with AWS Lambda for stemming
- E
AWS Lambda with a custom function for all preprocessing steps and Amazon S3 for storage
Show answer and explanation
Correct answers: C, E
Explanation
To preprocess text data in a scalable and serverless manner, AWS Lambda can execute all the preprocessing steps in a custom function, while AWS Step Functions can orchestrate these tasks if needed. Amazon S3 provides a scalable and cost-effective solution to store the input and output data. These services together fulfill the scenario's requirements effectively.
- A. Incorrect.
AWS Glue is better suited for ETL tasks involving structured or semi-structured data, but it is not ideal for the specific text preprocessing tasks outlined in the scenario.
- B. Incorrect.
Amazon Kinesis is used for real-time data streaming, which is not explicitly required in this scenario. Preprocessing steps like tokenization and stemming are not typically handled by Kinesis.
- C. Correct.
AWS Step Functions allow you to orchestrate multiple AWS Lambda functions, making it a suitable choice for managing and coordinating the preprocessing steps in a serverless manner.
- D. Incorrect.
Amazon Comprehend is a managed service for extracting insights from text, but it does not support stemming. Combining it with AWS Lambda for stemming could work, but it would not be as seamless as other options.
- E. Correct.
AWS Lambda can handle all the preprocessing steps (tokenization, stop word removal, and stemming) using a custom function, and Amazon S3 ensures scalable storage for input and output data.