DEA-C01 Question 101
Select 2You are tasked with designing a serverless workflow to process images uploaded to an S3 bucket. The workflow should trigger automatically when a new image is uploaded, resize the image using AWS Lambda, and store the resized image in another S3 bucket. You want to ensure the workflow is both scalable and cost-effective. Which combination of AWS services should you use to achieve this?
- A
Amazon S3 event notifications to trigger an AWS Lambda function
- B
AWS Step Functions to orchestrate the workflow
- C
Amazon DynamoDB to store metadata about the resized images
- D
AWS Lambda to resize the images
- E
Amazon SQS to queue the image processing tasks
Show answer and explanation
Correct answers: A, D
Explanation
The combination of Amazon S3 event notifications and AWS Lambda provides a serverless and event-driven workflow to handle image uploads and resizing. This approach is scalable, cost-effective, and eliminates the need for additional orchestration or queuing services. S3 notifications automatically trigger the Lambda function to process the images, and Lambda handles the resizing operation efficiently.
- A. Correct.
Correct. Amazon S3 event notifications can be configured to trigger an AWS Lambda function whenever a new image is uploaded, making it an ideal serverless and event-driven solution.
- B. Incorrect.
Incorrect. While AWS Step Functions can be used for workflow orchestration, it is unnecessary in this scenario because the workflow only involves a single Lambda function triggered directly by an S3 event.
- C. Incorrect.
Incorrect. Amazon DynamoDB is not required here since the scenario does not mention a need to store metadata about the resized images.
- D. Correct.
Correct. AWS Lambda is a serverless compute service that can resize the images as part of the workflow, making it both scalable and cost-effective.
- E. Incorrect.
Incorrect. Amazon SQS is not needed because this scenario focuses on direct event-driven processing rather than queuing tasks for asynchronous execution.