LeetQuiz Logo
Privacy Policy•contact@leetquiz.com
© 2025 LeetQuiz All rights reserved.
AWS Certified Developer - Associate

AWS Certified Developer - Associate

Get started today

Ultimate access to all questions.


Consider an application hosted on an EC2 instance that processes raw footage files. Typically, the encoding process for each file takes about 20 seconds. This application retrieves job messages from an SQS queue to start processing the files. What strategy would you recommend to manage situations where the encoding process takes longer than expected, ensuring that the same raw footage file is not processed simultaneously by multiple consumers?

Exam-Like



Explanation:

The correct solution to address the use-case where the video encoding process takes longer than usual, and to prevent the same raw footage from being processed by multiple consumers, is to use the ChangeMessageVisibility action to extend a message's visibility timeout. Amazon SQS employs a visibility timeout mechanism to ensure that once a message is received by a consumer, it is not accessible to other consumers until the processing is complete. By default, the visibility timeout for a message is set to 30 seconds, but it can be adjusted to a minimum of 0 seconds and a maximum of 12 hours. Extending the visibility timeout using the ChangeMessageVisibility action allows developers to manage the processing time for messages more effectively, especially in cases where tasks take longer than expected. This approach helps in avoiding duplicate processing and ensures that messages are only processed once, maintaining the integrity and efficiency of the application.

Powered ByGPT-5