SAA-C03 Question 38
Single answerA company is running a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The application stores user data in an Amazon RDS database and uses an Amazon S3 bucket to store user-uploaded files. The company notices that user-uploaded files occasionally fail to upload due to transient S3 service interruptions. What is the BEST solution to ensure the application's availability and reliability during such interruptions?
- A
Enable S3 Transfer Acceleration to reduce latency and improve performance.
- B
Implement an Amazon SQS queue to temporarily store file upload requests and process them later.
- C
Set up an Amazon CloudFront distribution in front of the S3 bucket to cache the uploaded files.
- D
Use an S3 Event Notification to trigger an AWS Lambda function that retries failed uploads.
Show answer and explanation
Correct answer: B
Explanation
Transient service interruptions in S3 can cause file uploads to fail. To address this, decoupling the upload process with an Amazon SQS queue ensures that file upload requests are not lost and can be retried later when the S3 service is available. This approach increases the reliability and availability of the application.
- A. Incorrect.
Enabling S3 Transfer Acceleration improves upload speed over long distances but does not address issues caused by S3 service interruptions.
- B. Correct.
Using an Amazon SQS queue decouples the upload process, allowing the application to temporarily store file upload requests and retry them later, ensuring reliability during S3 service interruptions.
- C. Incorrect.
Setting up an Amazon CloudFront distribution can help cache objects for faster read access, but it does not solve the issue of failed uploads caused by S3 service interruptions.
- D. Incorrect.
Using an S3 Event Notification to trigger a Lambda function is useful for processing events (e.g., when objects are uploaded), but it does not address retrying uploads during service interruptions.