
Answer-first summary for fast verification
Answer: Use the Amazon SQS Extended Client Library for Java to host messages that are larger than 256 KB in Amazon S3.
## Explanation **Correct Answer: A** **Why Option A is correct:** 1. **Amazon SQS Extended Client Library for Java** is specifically designed to handle large messages by storing them in Amazon S3 while keeping message metadata in SQS. 2. This solution requires minimal code changes - you just need to use the extended client library instead of the standard SQS client. 3. The library automatically handles storing large messages (>256KB) in S3 and includes a reference in the SQS message. 4. The application can continue using the same SQS interface while the library transparently manages the large message storage. **Why Option B is incorrect:** - Amazon EventBridge is an event bus service, not a direct replacement for SQS. Switching to EventBridge would require significant architectural changes and code modifications. - EventBridge has its own message size limits (256KB for PutEvents API). **Why Option C is incorrect:** - Amazon SQS has a hard limit of 256KB for message size that cannot be changed. This is a service limitation, not a configurable parameter. **Why Option D is incorrect:** - While technically possible, this would require significant custom code changes to implement the storage and retrieval logic from EFS. - The SQS Extended Client Library already provides a standardized, tested solution for this exact use case. **Key Points:** - SQS message size limit is fixed at 256KB - The Extended Client Library is AWS's recommended solution for handling large messages with SQS - It provides a seamless integration with S3 for storing large payloads - Requires minimal code changes compared to other options
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A company has a Java application that uses Amazon Simple Queue Service (Amazon SQS) to parse messages. The application cannot parse messages that are larger than 256 KB in size. The company wants to implement a solution to give the application the ability to parse messages as large as 50 MB.
Which solution will meet these requirements with the FEWEST changes to the code?
A
Use the Amazon SQS Extended Client Library for Java to host messages that are larger than 256 KB in Amazon S3.
B
Use Amazon EventBridge to post large messages from the application instead of Amazon SQS.
C
Change the limit in Amazon SQS to handle messages that are larger than 256 KB.
D
Store messages that are larger than 256 KB in Amazon Elastic File System (Amazon EFS). Configure Amazon SQS to reference this location in the messages.