SAA-C03 Question 522
Select 2A company is running a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The application stores user-uploaded files on Amazon S3. The company wants to decouple the components of the application and ensure that user uploads are processed asynchronously. Which solution will meet these requirements with MINIMAL operational overhead?
- A
Use Amazon SQS to queue the file processing requests and trigger an AWS Lambda function to process files.
- B
Set up an Amazon S3 event notification to trigger an AWS Lambda function whenever a file is uploaded.
- C
Configure an Amazon RDS database to store metadata about the uploaded files and use scheduled tasks to process them.
- D
Deploy an EC2 Auto Scaling group to process uploaded files from Amazon S3.
- E
Use Amazon SNS to fan out messages to multiple consumers for file processing.
Show answer and explanation
Correct answers: A, B
Explanation
To decouple the application and process uploads asynchronously with minimal operational overhead, you can use Amazon SQS with AWS Lambda or configure Amazon S3 event notifications to trigger AWS Lambda. Both approaches reduce the need for managing additional infrastructure and align with serverless best practices. Using RDS, EC2, or SNS would increase complexity and operational overhead, making them less suitable for this scenario.
- A. Correct.
This is a correct option because Amazon SQS can act as a queue to decouple the upload and processing components. AWS Lambda can then be triggered to process files asynchronously, reducing operational overhead.
- B. Correct.
This is a correct option because Amazon S3 event notifications can directly trigger an AWS Lambda function, allowing you to process uploaded files asynchronously without additional infrastructure.
- C. Incorrect.
This is not a correct option because using an Amazon RDS database for metadata storage and scheduled tasks increases operational overhead and does not effectively decouple the application.
- D. Incorrect.
This is not a correct option because deploying an EC2 Auto Scaling group adds operational overhead and does not align with the goal of minimal operational overhead. Additionally, it does not fully decouple the system.
- E. Incorrect.
This is not a correct option because while Amazon SNS can fan out messages, it does not inherently provide queueing or processing logic, and it may require additional components to manage the processing.